diff --git a/integrations/kube-agent-updater/cmd/teleport-kube-agent-updater/main.go b/integrations/kube-agent-updater/cmd/teleport-kube-agent-updater/main.go index fdd6a3e5ed691..95bead5b3e92c 100644 --- a/integrations/kube-agent-updater/cmd/teleport-kube-agent-updater/main.go +++ b/integrations/kube-agent-updater/cmd/teleport-kube-agent-updater/main.go @@ -113,8 +113,7 @@ func main() { // Now that we parsed the flags, we can tune the log level. var lvl slog.Level - err = (&lvl).UnmarshalText([]byte(logLevel)) - if err != nil { + if err := (&lvl).UnmarshalText([]byte(logLevel)); err != nil { ctrl.Log.Error(err, "Failed to parse log level", "level", logLevel) os.Exit(1) } diff --git a/integrations/operator/main.go b/integrations/operator/main.go index ae9c9ac6e995e..391a57ce46cb6 100644 --- a/integrations/operator/main.go +++ b/integrations/operator/main.go @@ -75,8 +75,7 @@ func main() { // Now that we parsed the flags, we can tune the log level. var logLevel slog.Level - err = (&logLevel).UnmarshalText([]byte(config.logLevel)) - if err != nil { + if err := (&logLevel).UnmarshalText([]byte(config.logLevel)); err != nil { setupLog.Error(err, "Failed to parse log level", "level", config.logLevel) os.Exit(1) }