From 541ead764c1b9a7474d49fc0a9c7298d27f0cf5a Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Mon, 5 Jan 2026 11:06:41 +0100 Subject: [PATCH] fix linter errors --- cmd/config.go | 2 +- cmd/root.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/config.go b/cmd/config.go index 1eaefe6..b825674 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -199,7 +199,7 @@ func (conf *Config) WriteConfigFile() (string, error) { cfgfile := filepath.Join(conf.GetConfigDir(), "config.toml") if FileExists(cfgfile) { - return "", fmt.Errorf("config file %s already exists.", cfgfile) + return "", fmt.Errorf("config file %s already exists", cfgfile) } var kloader = koanf.New(".") diff --git a/cmd/root.go b/cmd/root.go index 83b481c..6af1b43 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -58,7 +58,11 @@ func Execute(output io.Writer) int { return Die(err) } - fmt.Fprintln(output, msg) + _, err = fmt.Fprintln(output, msg) + if err != nil { + return Die(fmt.Errorf("failed to print to output: %s", err)) + } + return 0 }