diff --git a/cmd/watchdog/main.go b/cmd/watchdog/main.go index de169ad..221328a 100644 --- a/cmd/watchdog/main.go +++ b/cmd/watchdog/main.go @@ -82,9 +82,9 @@ func init() { String("ingestion-path", "", "ingestion endpoint path (overrides config)") // Bind flags to viper - viper.BindPFlag("server.listen_addr", rootCmd.PersistentFlags().Lookup("listen-addr")) - viper.BindPFlag("server.metrics_path", rootCmd.PersistentFlags().Lookup("metrics-path")) - viper.BindPFlag("server.ingestion_path", rootCmd.PersistentFlags().Lookup("ingestion-path")) + _ = viper.BindPFlag("server.listen_addr", rootCmd.PersistentFlags().Lookup("listen-addr")) + _ = viper.BindPFlag("server.metrics_path", rootCmd.PersistentFlags().Lookup("metrics-path")) + _ = viper.BindPFlag("server.ingestion_path", rootCmd.PersistentFlags().Lookup("ingestion-path")) } func initConfig() { diff --git a/cmd/watchdog/root.go b/cmd/watchdog/root.go index fd0c98c..7e8ff22 100644 --- a/cmd/watchdog/root.go +++ b/cmd/watchdog/root.go @@ -95,7 +95,7 @@ func Run(cfg *config.Config) error { // Health check endpoint mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte("OK")) + _, _ = w.Write([]byte("OK")) }) // Serve whitelisted static files from /web/ if the directory exists diff --git a/internal/aggregate/metrics_test.go b/internal/aggregate/metrics_test.go index 5630d8e..3162fad 100644 --- a/internal/aggregate/metrics_test.go +++ b/internal/aggregate/metrics_test.go @@ -344,7 +344,7 @@ func TestMetricsAggregator_Shutdown_WaitsForGoroutine(t *testing.T) { done := make(chan struct{}) go func() { ctx := context.Background() - agg.Shutdown(ctx) + _ = agg.Shutdown(ctx) close(done) }() diff --git a/nix/shell.nix b/nix/shell.nix index 5c746d3..9d6445d 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -4,6 +4,7 @@ gopls, golines, delve, + golangci-lint, }: mkShell { name = "go"; @@ -12,5 +13,6 @@ mkShell { gopls # formatter golines # line wrapper delve # debugger + golangci-lint # linter ]; }