Fix: Check DisableColors in Colorize and ColorizeBG

This commit is contained in:
Slavomir 2021-08-09 15:48:32 +02:00
parent fca589f28f
commit 3af5c3d17a
1 changed files with 6 additions and 0 deletions

View File

@ -227,11 +227,17 @@ func StringToColorBG(str string) func(string) string {
}
func Colorize(str string) string {
if DisableColors {
return str
}
colorizer := StringToColor(str)
return colorizer(str)
}
func ColorizeBG(str string) string {
if DisableColors {
return str
}
colorizer := StringToColorBG(str)
return colorizer(str)
}