summaryrefslogtreecommitdiff
path: root/internal/io/dlog/level.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-10-09 21:10:29 +0300
committerPaul Buetow <paul@buetow.org>2021-10-10 13:36:41 +0300
commit97747ea0f3178f7f5890512d483fdccaa82846b0 (patch)
tree9ff1335ca26afc90e55fd6de416457e252d75a35 /internal/io/dlog/level.go
parent7a7169791a64190e1002e38bc9c04ad0d5c1ce1f (diff)
vetting and linting and some code restyling
Diffstat (limited to 'internal/io/dlog/level.go')
-rw-r--r--internal/io/dlog/level.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/io/dlog/level.go b/internal/io/dlog/level.go
index 248ad83..0971094 100644
--- a/internal/io/dlog/level.go
+++ b/internal/io/dlog/level.go
@@ -7,6 +7,7 @@ import (
type level int
+// Available log levels.
const (
Fatal level = iota
Error level = iota
@@ -20,7 +21,8 @@ const (
All level = iota
)
-var allLevels = []level{Fatal, Error, Warn, Info, Default, Verbose, Debug, Devel, Trace, All}
+var allLevels = []level{Fatal, Error, Warn, Info, Default, Verbose, Debug,
+ Devel, Trace, All}
func newLevel(l string) level {
switch strings.ToLower(l) {
@@ -73,6 +75,5 @@ func (l level) String() string {
case All:
return "ALL"
}
-
panic("Unknown log level " + fmt.Sprintf("%d", l))
}