style: gofmt and fix golangcl-ilint

This commit is contained in:
yusing
2025-05-11 06:34:35 +08:00
parent 71ca8c738e
commit 54d7508f5d
4 changed files with 4 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ func warnNoMatchDomains() {
var warnNoMatchDomainOnce sync.Once
const (
HeaderXGoDoxyWebsocketAllowedDomains = "X-GoDoxy-Websocket-Allowed-Domains"
HeaderXGoDoxyWebsocketAllowedDomains = "X-Godoxy-Websocket-Allowed-Domains"
)
func WebsocketAllowedDomains(h http.Header) []string {
@@ -62,7 +62,6 @@ func Periodic(w http.ResponseWriter, r *http.Request, interval time.Duration, do
defer conn.CloseNow()
if err := do(conn); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
@@ -75,7 +74,6 @@ func Periodic(w http.ResponseWriter, r *http.Request, interval time.Duration, do
return
case <-ticker.C:
if err := do(conn); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}

View File

@@ -147,7 +147,7 @@ func TestEntrypointBypassRoute(t *testing.T) {
}
err := entry.SetMiddlewares([]map[string]any{
{
"use": "redirectHTTP",
"use": "redirectHTTP",
"bypass": []string{"route test-route"},
},
{