mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 07:57:21 +08:00
fix: lint
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/go-rat/sessions"
|
||||
"github.com/knadh/koanf/v2"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/go-rat/chix"
|
||||
"github.com/go-rat/sessions"
|
||||
"github.com/knadh/koanf/v2"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/TheTNB/panel/internal/biz"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-rat/sessions"
|
||||
"github.com/google/wire"
|
||||
"github.com/knadh/koanf/v2"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/chi/v5/middleware"
|
||||
"github.com/go-rat/sessions"
|
||||
sessionmiddleware "github.com/go-rat/sessions/middleware"
|
||||
"github.com/golang-cz/httplog"
|
||||
"github.com/google/wire"
|
||||
"github.com/knadh/koanf/v2"
|
||||
|
||||
"github.com/TheTNB/panel/internal/biz"
|
||||
)
|
||||
|
||||
var ProviderSet = wire.NewSet(NewMiddlewares)
|
||||
|
||||
@@ -2,11 +2,12 @@ package middleware
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/TheTNB/panel/internal/biz"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/go-rat/chix"
|
||||
|
||||
"github.com/TheTNB/panel/internal/biz"
|
||||
)
|
||||
|
||||
// MustInstall 确保已安装应用
|
||||
@@ -33,7 +34,7 @@ func MustInstall(app biz.AppRepo) func(next http.Handler) http.Handler {
|
||||
|
||||
flag := false
|
||||
for _, s := range slugs {
|
||||
if installed, _ := app.IsInstalled("slug = ?", s); installed { // TODO 优化实现
|
||||
if installed, _ := app.IsInstalled("slug = ?", s); installed {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@ import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"github.com/go-rat/sessions"
|
||||
"net"
|
||||
"net/http"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/go-rat/chix"
|
||||
"github.com/go-rat/sessions"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user