diff --git a/Makefile b/Makefile index 95b5478..0459dbe 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ endif GOBUILD ?= CGO_ENABLED=0 go build PACKAGES ?= $(shell go list ./...) -SOURCES ?= $(shell find . -name "*.go" -type f) +SOURCES ?= $(shell find . -name "*.go" -type f -not -path ./.devenv/\* -not -path ./.direnv/\*) GENERATE ?= $(PACKAGES) TAGS ?= netgo diff --git a/pkg/command/cmd.go b/pkg/command/cmd.go index 4e6e933..4ba0bef 100644 --- a/pkg/command/cmd.go +++ b/pkg/command/cmd.go @@ -15,7 +15,7 @@ var ( SilenceErrors: false, SilenceUsage: true, - PersistentPreRunE: func(ccmd *cobra.Command, args []string) error { + PersistentPreRunE: func(_ *cobra.Command, _ []string) error { return setupLogger() }, diff --git a/pkg/command/server.go b/pkg/command/server.go index b33ce73..6eec77c 100644 --- a/pkg/command/server.go +++ b/pkg/command/server.go @@ -214,7 +214,7 @@ func serverAction(_ *cobra.Command, _ []string) { <-stop return nil - }, func(err error) { + }, func(_ error) { close(stop) }) } diff --git a/pkg/router/router.go b/pkg/router/router.go index 0712215..dae8252 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -50,14 +50,14 @@ func Load(cfg *config.Config) http.Handler { root.Mount("/debug", middleware.Profiler()) } - root.Get("/healthz", func(w http.ResponseWriter, r *http.Request) { + root.Get("/healthz", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/plain") w.WriteHeader(http.StatusOK) io.WriteString(w, http.StatusText(http.StatusOK)) }) - root.Get("/readyz", func(w http.ResponseWriter, r *http.Request) { + root.Get("/readyz", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/plain") w.WriteHeader(http.StatusOK) @@ -88,14 +88,14 @@ func Metrics(cfg *config.Config) http.Handler { mux.Route("/", func(root chi.Router) { root.Get("/metrics", prometheus.Handler(cfg.Metrics.Token)) - root.Get("/healthz", func(w http.ResponseWriter, r *http.Request) { + root.Get("/healthz", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/plain") w.WriteHeader(http.StatusOK) io.WriteString(w, http.StatusText(http.StatusOK)) }) - root.Get("/readyz", func(w http.ResponseWriter, r *http.Request) { + root.Get("/readyz", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "text/plain") w.WriteHeader(http.StatusOK)