From 6359ee1fb5cb31c6602a1b3e572dac6c90ffd4a8 Mon Sep 17 00:00:00 2001 From: Vincent Boutour Date: Tue, 23 Apr 2024 23:06:18 +0200 Subject: [PATCH] refactor: Removing useless errcheck for parse flag Signed-off-by: Vincent Boutour --- cmd/ketchup/api.go | 5 +---- cmd/notifier/notifier.go | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cmd/ketchup/api.go b/cmd/ketchup/api.go index c9aae98e..1737f81a 100644 --- a/cmd/ketchup/api.go +++ b/cmd/ketchup/api.go @@ -5,7 +5,6 @@ import ( "embed" "flag" "fmt" - "log" "net/http" "os" @@ -79,9 +78,7 @@ func main() { notifierConfig := notifier.Flags(fs, "notifier") schedulerConfig := scheduler.Flags(fs, "scheduler") - if err := fs.Parse(os.Args[1:]); err != nil { - log.Fatal(err) - } + _ = fs.Parse(os.Args[1:]) alcotest.DoAndExit(alcotestConfig) diff --git a/cmd/notifier/notifier.go b/cmd/notifier/notifier.go index 7a3383fd..b5b152b0 100644 --- a/cmd/notifier/notifier.go +++ b/cmd/notifier/notifier.go @@ -3,7 +3,6 @@ package main import ( "context" "flag" - "log" "log/slog" "os" @@ -40,9 +39,7 @@ func main() { dockerConfig := docker.Flags(fs, "docker") notifierConfig := notifier.Flags(fs, "notifier") - if err := fs.Parse(os.Args[1:]); err != nil { - log.Fatal(err) - } + _ = fs.Parse(os.Args[1:]) logger.Init(loggerConfig)