diff --git a/cmd/rr/cmd/root.go b/cmd/rr/cmd/root.go index 5fa76b874..74506004b 100644 --- a/cmd/rr/cmd/root.go +++ b/cmd/rr/cmd/root.go @@ -112,7 +112,7 @@ func init() { func configureLogger(format string) { switch format { case "color", "default": - util.EnableColors = true + util.Colorize = true Logger.Formatter = &logrus.TextFormatter{ForceColors: true} case "plain": Logger.Formatter = &logrus.TextFormatter{DisableColors: true} diff --git a/cmd/util/cprint.go b/cmd/util/cprint.go index 61199c4a8..5bf8a8ca1 100644 --- a/cmd/util/cprint.go +++ b/cmd/util/cprint.go @@ -8,8 +8,8 @@ import ( ) var ( - reg *regexp.Regexp - EnableColors bool + reg *regexp.Regexp + Colorize bool ) func init() { @@ -24,7 +24,7 @@ func Printf(format string, args ...interface{}) { // Sprintf works identically to fmt.Sprintf but adds `color formatting support for CLI`. func Sprintf(format string, args ...interface{}) string { format = reg.ReplaceAllStringFunc(format, func(s string) string { - if !EnableColors { + if !Colorize { return "" }