diff --git a/level.go b/level.go index 3a52aaa..4974c30 100644 --- a/level.go +++ b/level.go @@ -60,11 +60,6 @@ var allLevels = map[Level][]string{ TraceLevel: {"trace", "TRACE", "tac", "TAC"}, } -// AllLevels returns all supported log levels. -func AllLevels() []Level { - return []Level{PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, TraceLevel} -} - // String returns the string form of the current level. // If the log level is not supported, always returns "unknown". func (level Level) String() string { diff --git a/level_test.go b/level_test.go index 24bf45c..5763321 100644 --- a/level_test.go +++ b/level_test.go @@ -15,21 +15,9 @@ package logger import ( - "fmt" "testing" ) -func TestAllLevels(t *testing.T) { - ls := AllLevels() - if len(ls) != 7 { - t.Fatalf("AllLevels(): %v", ls) - } - want := []Level{PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, TraceLevel} - if fmt.Sprint(ls) != fmt.Sprint(want) { - t.Fatalf("AllLevels(): %v", ls) - } -} - func TestLevel_String(t *testing.T) { items := []struct { Given Level