Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Feb 14, 2019
1 parent 77cb14c commit 9446772
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/rr/cmd/root.go
Expand Up @@ -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}
Expand Down
6 changes: 3 additions & 3 deletions cmd/util/cprint.go
Expand Up @@ -8,8 +8,8 @@ import (
)

var (
reg *regexp.Regexp
EnableColors bool
reg *regexp.Regexp
Colorize bool
)

func init() {
Expand All @@ -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 ""
}

Expand Down

0 comments on commit 9446772

Please sign in to comment.