various: resolve linter warnings

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia83658dd31f9e4042d0a3a754fc6e4106a6a6964
This commit is contained in:
raf 2026-03-07 09:44:23 +03:00
commit b7b1d62cfc
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 7 additions and 5 deletions

View file

@ -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() {

View file

@ -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

View file

@ -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)
}()

View file

@ -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
];
}