Skip to content

Commit

Permalink
Revert "log: change level type to string"
Browse files Browse the repository at this point in the history
This reverts commit 3cc9824.
  • Loading branch information
Choraden committed Jun 18, 2024
1 parent d668db7 commit b6a0d6a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions log/level.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

package log

type Level string
type Level int32

const (
ErrorLevel Level = "error"
InfoLevel Level = "info"
DebugLevel Level = "debug"
ErrorLevel Level = iota
InfoLevel
DebugLevel
)

func (l Level) String() string {
return string(l)
return [3]string{"error", "info", "debug"}[l]
}

0 comments on commit b6a0d6a

Please sign in to comment.