func (c *Config) Color(opts map[string]interface{}) bool {

	// default to the colorization specified in the configs...
	colorize := c.Colorize

	// ... however, only apply colorization if we're writing to a tty...
	if !isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd()) {
		colorize = false
	}

	// ... *unless* the --colorize flag was passed
	if opts["--colorize"] == true {
		colorize = true
	}

	return colorize
}
// Color indicates whether colorization should be applied to the output
Color indicates whether colorization should be applied to the output
// Color indicates whether colorization should be applied to the output
func (c *Config) Color(opts map[string]interface{}) bool {
	colorize := c.Colorize
	if !isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd()) {
		colorize = false
	}
	if opts["--colorize"] == true {
		colorize = true
	}
	return colorize
}
func ( c * Config ) Color ( opts map [ string ] interface { } ) bool { colorize := c . Colorize if ! isatty . IsTerminal ( os . Stdout . Fd ( ) ) && ! isatty . IsCygwinTerminal ( os . Stdout . Fd ( ) ) { colorize = false } if opts [ " " ] == true { colorize = true } return colorize }
Color indicates whether colorization should be applied to the output
Color indicates whether colorization should be applied to the output
// default to the colorization specified in the configs... // ... however, only apply colorization if we're writing to a tty... // ... *unless* the --colorize flag was passed