Faint returns a faintly-colored string that's used to de-prioritize text written to stdout
(str string, colorize bool)
| 7 | // Faint returns a faintly-colored string that's used to de-prioritize text |
| 8 | // written to stdout |
| 9 | func Faint(str string, colorize bool) string { |
| 10 | // make `str` faint only if colorization has been requested |
| 11 | if colorize { |
| 12 | return fmt.Sprintf("\033[2m%s\033[0m", str) |
| 13 | } |
| 14 | |
| 15 | // otherwise, return the string unmodified |
| 16 | return str |
| 17 | } |