Bold returns a formatter that renders text in bold if the terminal supports it.
(s string)
| 69 | // Bold returns a formatter that renders text in bold |
| 70 | // if the terminal supports it. |
| 71 | func Bold(s string) string { |
| 72 | if !isTerm() { |
| 73 | return s |
| 74 | } |
| 75 | return pretty.Sprint(pretty.Bold(), s) |
| 76 | } |
| 77 | |
| 78 | // BoldFmt returns a formatter that renders text in bold |
| 79 | // if the terminal supports it. |
no test coverage detected