BoldFmt returns a formatter that renders text in bold if the terminal supports it.
()
| 78 | // BoldFmt returns a formatter that renders text in bold |
| 79 | // if the terminal supports it. |
| 80 | func BoldFmt() pretty.Formatter { |
| 81 | if !isTerm() { |
| 82 | return pretty.Style{} |
| 83 | } |
| 84 | return pretty.Bold() |
| 85 | } |
| 86 | |
| 87 | // Timestamp formats a timestamp for display. |
| 88 | func Timestamp(t time.Time) string { |
no test coverage detected