Closed zddhub closed 9 years ago
That would work, tough please use https://github.com/mattn/go-isatty because it has Windows support too:
var NoColor = !isatty.IsTerminal(os.Stdout.Fd())
Also please change the doc to point that it changes dynamically:
// NoColor defines if the output is colorized or not. It's dynamically set to
// false or true based on the stdout's file descriptor referring to a terminal
// or not. This is a global option and affects all colors. For more control
// over each color block use the methods DisableColor() individually.
Done
Thanks @zddhub
I find a solution to close https://github.com/fatih/color/issues/18. Do you agree?