Skip to content

Commit

Permalink
Fix golangci-lint unused-parameter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bison committed Feb 20, 2024
1 parent 852f2f4 commit 91a4c7d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func cmdFilesystem(logger log.Logger, reg *prometheus.Registry, promClient api.C
}
<-ctx.Done()
return nil
}, func(err error) {
}, func(_ error) {
cancel()
})
}
Expand Down Expand Up @@ -158,7 +158,7 @@ func cmdFilesystem(logger log.Logger, reg *prometheus.Registry, promClient api.C
level.Warn(logger).Log("msg", "encountered file watcher error", "err", err)
}
}
}, func(err error) {
}, func(_ error) {
_ = watcher.Close()
cancel()
})
Expand Down Expand Up @@ -195,7 +195,7 @@ func cmdFilesystem(logger log.Logger, reg *prometheus.Registry, promClient api.C
reload <- struct{}{} // Trigger a Prometheus reload
}
}
}, func(err error) {
}, func(_ error) {
cancel()
})
}
Expand Down Expand Up @@ -235,7 +235,7 @@ func cmdFilesystem(logger log.Logger, reg *prometheus.Registry, promClient api.C
}
}
}
}, func(err error) {
}, func(_ error) {
cancel()
close(reload)
})
Expand All @@ -260,7 +260,7 @@ func cmdFilesystem(logger log.Logger, reg *prometheus.Registry, promClient api.C
gr.Add(func() error {
level.Info(logger).Log("msg", "starting up HTTP API", "address", server.Addr)
return server.ListenAndServe()
}, func(err error) {
}, func(_ error) {
_ = server.Shutdown(context.Background())
})
}
Expand Down
4 changes: 2 additions & 2 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func cmdKubernetes(
}
setupLog.Info("starting manager")
return mgr.Start(ctx)
}, func(err error) {
}, func(_ error) {
cancel()
})
}
Expand All @@ -137,7 +137,7 @@ func cmdKubernetes(
return server.ListenAndServeTLS(certFile, privateKeyFile)
}
return server.ListenAndServe()
}, func(err error) {
}, func(_ error) {
shutdownCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
_ = server.Shutdown(shutdownCtx)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func cmdAPI(
}

r.Handle("/metrics", promhttp.HandlerFor(reg, promhttp.HandlerOpts{}))
r.Get("/objectives", func(w http.ResponseWriter, r *http.Request) {
r.Get("/objectives", func(w http.ResponseWriter, _ *http.Request) {
err := tmpl.Execute(w, struct {
PrometheusURL string
PathPrefix string
Expand Down

0 comments on commit 91a4c7d

Please sign in to comment.