Rename ParseLevel to SetLevelFromString ParseLevel sounds more like it would return the level instead of setting it.
1 files changed, 1 insertions(+), 1 deletions(-) M log.go
M log.go => log.go +1 -1
@@ 37,7 37,7 @@ func (l *Logger) SetLevel(level Level) { l.level = level } -func (l *Logger) ParseLevel(level string) error { +func (l *Logger) SetLevelFromString(level string) error { switch strings.ToLower(level) { case "error": l.level = Error