misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-10-10 19:23:17 +02:00
commit 058a6865ff
No known key found for this signature in database
GPG key ID: 82E42E7F3B34C97E
5 changed files with 50 additions and 36 deletions

View file

@ -42,3 +42,16 @@ var (
FATAL: tui.FOREWHITE + tui.BACKRED + tui.BOLD,
}
)
// LevelName returns the name of a verbosity level.
func LevelName(v Verbosity) string {
return LevelNames[v]
}
// LevelColor returns the color of a verbosity level or "" if effects are disabled.
func LevelColor(v Verbosity) string {
if NoEffects {
return ""
}
return LevelColors[v]
}