mirror of
https://github.com/NotAShelf/watchdog.git
synced 2026-04-18 08:00:08 +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)")
|
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() {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue