variable global color

This commit is contained in:
gedenata 2020-06-10 13:59:28 +08:00
parent 417de6257a
commit 81799caeb6

View file

@ -52,7 +52,7 @@ func makeColorFunc(color string) func(string) string {
}
}
func isColorEnabled() bool {
func isColorEnabled() bool {
if !checkedNoColor {
_isColorEnabled = os.Getenv("NO_COLOR") == ""
checkedNoColor = true