(value string)
| 76 | ) |
| 77 | |
| 78 | func (s style) format(value string) string { |
| 79 | if s == plain || colorDisabled { |
| 80 | return value |
| 81 | } |
| 82 | return "\033[" + string(s) + "m" + value + "\033[0m" |
| 83 | } |
| 84 | |
| 85 | func truncate(s string, maxWidth int) string { |
| 86 | if runewidth.StringWidth(s) <= maxWidth { |
no outgoing calls
no test coverage detected