summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/rr/cmd/root.go2
-rw-r--r--cmd/util/cprint.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd/rr/cmd/root.go b/cmd/rr/cmd/root.go
index 5fa76b87..74506004 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 61199c4a..5bf8a8ca 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 `<white+hb>color formatting support for CLI</reset>`.
func Sprintf(format string, args ...interface{}) string {
format = reg.ReplaceAllStringFunc(format, func(s string) string {
- if !EnableColors {
+ if !Colorize {
return ""
}