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)") String("ingestion-path", "", "ingestion endpoint path (overrides config)")
// Bind flags to viper // Bind flags to viper
viper.BindPFlag("server.listen_addr", rootCmd.PersistentFlags().Lookup("listen-addr")) _ = viper.BindPFlag("server.listen_addr", rootCmd.PersistentFlags().Lookup("listen-addr"))
viper.BindPFlag("server.metrics_path", rootCmd.PersistentFlags().Lookup("metrics-path")) _ = viper.BindPFlag("server.metrics_path", rootCmd.PersistentFlags().Lookup("metrics-path"))
viper.BindPFlag("server.ingestion_path", rootCmd.PersistentFlags().Lookup("ingestion-path")) _ = viper.BindPFlag("server.ingestion_path", rootCmd.PersistentFlags().Lookup("ingestion-path"))
} }
func initConfig() { func initConfig() {

View file

@ -95,7 +95,7 @@ func Run(cfg *config.Config) error {
// Health check endpoint // Health check endpoint
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
w.Write([]byte("OK")) _, _ = w.Write([]byte("OK"))
}) })
// Serve whitelisted static files from /web/ if the directory exists // 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{}) done := make(chan struct{})
go func() { go func() {
ctx := context.Background() ctx := context.Background()
agg.Shutdown(ctx) _ = agg.Shutdown(ctx)
close(done) close(done)
}() }()

View file

@ -4,6 +4,7 @@
gopls, gopls,
golines, golines,
delve, delve,
golangci-lint,
}: }:
mkShell { mkShell {
name = "go"; name = "go";
@ -12,5 +13,6 @@ mkShell {
gopls # formatter gopls # formatter
golines # line wrapper golines # line wrapper
delve # debugger delve # debugger
golangci-lint # linter
]; ];
} }