From d59dd39e5796dbfa2c8f8dfd8384c97ed1213fb9 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 10 Dec 2024 11:28:57 +0100 Subject: [PATCH] annotate with nolint:errcheck --- cmd/root/io.go | 3 +-- cmd/root/logger.go | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmd/root/io.go b/cmd/root/io.go index 39af251f8..96c5a9a26 100644 --- a/cmd/root/io.go +++ b/cmd/root/io.go @@ -21,8 +21,7 @@ func initOutputFlag(cmd *cobra.Command) *outputFlag { // Configure defaults from environment, if applicable. // If the provided value is invalid it is ignored. if v, ok := env.Lookup(cmd.Context(), envOutputFormat); ok { - // QQQ log the error? - _ = f.output.Set(v) + f.output.Set(v) //nolint:errcheck } cmd.PersistentFlags().VarP(&f.output, "output", "o", "output type: text or json") diff --git a/cmd/root/logger.go b/cmd/root/logger.go index 1cb8f5a6e..aeadf6ed5 100644 --- a/cmd/root/logger.go +++ b/cmd/root/logger.go @@ -84,14 +84,13 @@ func initLogFlags(cmd *cobra.Command) *logFlags { // Configure defaults from environment, if applicable. // If the provided value is invalid it is ignored. if v, ok := env.Lookup(cmd.Context(), envLogFile); ok { - // QQQ log the error? here and below - _ = f.file.Set(v) + f.file.Set(v) //nolint:errcheck } if v, ok := env.Lookup(cmd.Context(), envLogLevel); ok { - _ = f.level.Set(v) + f.level.Set(v) //nolint:errcheck } if v, ok := env.Lookup(cmd.Context(), envLogFormat); ok { - _ = f.output.Set(v) + f.output.Set(v) //nolint:errcheck } flags := cmd.PersistentFlags()