Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: rosstimothy <[email protected]>
  • Loading branch information
hugoShaka and rosstimothy authored Jan 10, 2025
1 parent 9905179 commit 0c0ff61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
3 changes: 1 addition & 2 deletions integrations/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 0c0ff61

Please sign in to comment.