Documentation ¶
Index ¶
- func Bold(str string) string
- func Colorize(text string, tag string, style Style) string
- func Emojify(tag string) string
- func PrettyBlame(blame *blame.LineBlame, ageLimit int, style Style) string
- func PrettyFilename(path string, nComments int, style Style) string
- func PrettyLineNumber(number int, maxDigits int) string
- func PrettySummary(counter map[string]int, style Style) string
- type Style
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Colorize ¶
Colorize colorizes the provided text according to the tag and style. If style != FullStyle, this function does nothing.
func PrettyBlame ¶
PrettyBlame returns a string with the format
[John Doe]
If the commit is older than ageLimit (in days), the format is
[OLD John Doe]
Color is added according to the style.
func PrettyFilename ¶
PrettyFilename returns a string with the format
- tests/generic_code.py (10 comments)
The string if formatted according to the provided style (colorful or black-and-white).
func PrettyLineNumber ¶
PrettyLineNumber returns a string with the format
[Line 123]
The string is padded according to the maximum number of digits (maxDigits) to ensure vertical alignment between line numbers of the same file.
Types ¶
Click to show internal directories.
Click to hide internal directories.