diff --git a/.golangci.yml b/.golangci.yml index c7c38d8..13b3933 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -68,6 +68,12 @@ issues: linters: - gosec - dupl + - linters: + - unparam + - unused + - revive + path: _test\.go$ + text: "unused-parameter" exclude-use-default: false service: diff --git a/app/main.go b/app/main.go index c27d90d..8b803b9 100644 --- a/app/main.go +++ b/app/main.go @@ -358,7 +358,7 @@ func makePluginConductor(ctx context.Context) proxy.MiddlewareProvider { conductor := &plugin.Conductor{ Address: opts.Plugin.Listen, - RPCDialer: plugin.RPCDialerFunc(func(network, address string) (plugin.RPCClient, error) { + RPCDialer: plugin.RPCDialerFunc(func(_, address string) (plugin.RPCClient, error) { return rpc.Dial("tcp", address) }), } diff --git a/app/proxy/proxy.go b/app/proxy/proxy.go index 26cb1fe..1c42f26 100644 --- a/app/proxy/proxy.go +++ b/app/proxy/proxy.go @@ -353,7 +353,7 @@ func (h *Http) matchHandler(next http.Handler) http.Handler { func (h *Http) assetsHandler() http.HandlerFunc { if h.AssetsLocation == "" || h.AssetsWebRoot == "" { - return func(writer http.ResponseWriter, request *http.Request) {} + return func(_ http.ResponseWriter, _ *http.Request) {} } var notFound []byte @@ -371,7 +371,7 @@ func (h *Http) assetsHandler() http.HandlerFunc { fs, err := h.fileServer(h.AssetsWebRoot, h.AssetsLocation, h.AssetsSPA, notFound) if err != nil { log.Printf("[WARN] can't initialize assets server, %v", err) - return func(writer http.ResponseWriter, request *http.Request) {} + return func(_ http.ResponseWriter, _ *http.Request) {} } return h.CacheControl.Middleware(fs).ServeHTTP }