Skip to content

Commit

Permalink
slogutil: imp code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizzick committed Sep 30, 2024
1 parent e9b9a24 commit 954d7d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logutil/slogutil/verbosity.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
LevelError = slog.LevelError
)

// VerbosityToLevel returns [slog.Level] for given verbosity.
// VerbosityToLevel returns log level for given verbosity.
func VerbosityToLevel(l uint8) (lvl slog.Level, err error) {
switch l {
case 0:
Expand All @@ -26,6 +26,6 @@ func VerbosityToLevel(l uint8) (lvl slog.Level, err error) {
case 2:
return LevelTrace, nil
default:
return lvl, fmt.Errorf("verbosity: %w: %d", errors.ErrBadEnumValue, l)
return lvl, fmt.Errorf("%w: %d", errors.ErrBadEnumValue, l)
}
}

0 comments on commit 954d7d2

Please sign in to comment.