Skip to content

Commit

Permalink
lint: address unused param warn, supress for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Mar 15, 2024
1 parent 79e01fe commit c92b4e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .golangci.yml
Expand Up @@ -68,6 +68,12 @@ issues:
linters:
- gosec
- dupl
- linters:
- unparam
- unused
- revive
path: _test\.go$
text: "unused-parameter"
exclude-use-default: false

service:
Expand Down
2 changes: 1 addition & 1 deletion app/main.go
Expand Up @@ -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)
}),
}
Expand Down
4 changes: 2 additions & 2 deletions app/proxy/proxy.go
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit c92b4e8

Please sign in to comment.