mirror of
https://github.com/NotAShelf/watchdog.git
synced 2026-04-14 22:33:55 +00:00
various: resolve linter warnings
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia83658dd31f9e4042d0a3a754fc6e4106a6a6964
This commit is contained in:
parent
675f8cc1c7
commit
b7b1d62cfc
4 changed files with 7 additions and 5 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue