colorize the msg using ANSI color escapes.
(msg string)
| 85 | |
| 86 | // colorize the msg using ANSI color escapes. |
| 87 | func colorize(msg string) string { |
| 88 | var red = 31 |
| 89 | var colorEscape = fmt.Sprintf("\033[0;%dm", red) |
| 90 | var colorResetEscape = "\033[0m" |
| 91 | return colorEscape + msg + colorResetEscape |
| 92 | } |
| 93 | |
| 94 | // IsTerminal returns whether the UI is known to be tied to an |
| 95 | // interactive terminal (as opposed to being redirected to a file). |
no outgoing calls
no test coverage detected
searching dependent graphs…