Fix: Check DisableColors in Colorize and ColorizeBG
This commit is contained in:
parent
fca589f28f
commit
3af5c3d17a
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue