Versions in this module Expand all Collapse all v6 v6.0.0 Jan 6, 2023 Changes in this version + const EscapeReset + const EscapeStart + const EscapeStartRune + const EscapeStop + const EscapeStopRune + var ANSICodesSupported = areANSICodesSupported() + func DisableColors() + func EnableColors() + func Escape(str string, escapeSeq string) string + func Filter(s []string, f func(string) bool) []string + func InsertEveryN(str string, runeToInsert rune, n int) string + func LongestLineLen(str string) int + func OverrideRuneWidthEastAsianWidth(val bool) + func Pad(str string, maxLen int, paddingChar rune) string + func RepeatAndTrim(str string, maxRunes int) string + func RuneCount(str string) int + func RuneWidth(r rune) int + func RuneWidthWithoutEscSequences(str string) int + func Snip(str string, length int, snipIndicator string) string + func StripEscape(str string) string + func Trim(str string, maxLen int) string + func WrapHard(str string, wrapLen int) string + func WrapSoft(str string, wrapLen int) string + func WrapText(str string, wrapLen int) string + type Align int + const AlignCenter + const AlignDefault + const AlignJustify + const AlignLeft + const AlignRight + func (a Align) Apply(text string, maxLength int) string + func (a Align) HTMLProperty() string + func (a Align) MarkdownProperty() string + type Color int + const BgBlack + const BgBlue + const BgCyan + const BgGreen + const BgHiBlack + const BgHiBlue + const BgHiCyan + const BgHiGreen + const BgHiMagenta + const BgHiRed + const BgHiWhite + const BgHiYellow + const BgMagenta + const BgRed + const BgWhite + const BgYellow + const BlinkRapid + const BlinkSlow + const Bold + const Concealed + const CrossedOut + const Faint + const FgBlack + const FgBlue + const FgCyan + const FgGreen + const FgHiBlack + const FgHiBlue + const FgHiCyan + const FgHiGreen + const FgHiMagenta + const FgHiRed + const FgHiWhite + const FgHiYellow + const FgMagenta + const FgRed + const FgWhite + const FgYellow + const Italic + const Reset + const ReverseVideo + const Underline + func (c Color) EscapeSeq() string + func (c Color) HTMLProperty() string + func (c Color) Sprint(a ...interface{}) string + func (c Color) Sprintf(format string, a ...interface{}) string + type Colors []Color + func (c Colors) EscapeSeq() string + func (c Colors) HTMLProperty() string + func (c Colors) Sprint(a ...interface{}) string + func (c Colors) Sprintf(format string, a ...interface{}) string + type Cursor rune + const CursorDown + const CursorLeft + const CursorRight + const CursorUp + const EraseLine + func (c Cursor) Sprint() string + func (c Cursor) Sprintn(n int) string + type Direction int + const Default + const LeftToRight + const RightToLeft + func (d Direction) Modifier() string + type Format int + const FormatDefault + const FormatLower + const FormatTitle + const FormatUpper + func (tc Format) Apply(text string) string + type Transformer func(val interface{}) string + func NewJSONTransformer(prefix string, indent string) Transformer + func NewNumberTransformer(format string) Transformer + func NewTimeTransformer(layout string, location *time.Location) Transformer + func NewURLTransformer(colors ...Color) Transformer + func NewUnixTimeTransformer(layout string, location *time.Location) Transformer + type VAlign int + const VAlignBottom + const VAlignDefault + const VAlignMiddle + const VAlignTop + func (va VAlign) Apply(lines []string, maxLines int) []string + func (va VAlign) ApplyStr(text string, maxLines int) []string + func (va VAlign) HTMLProperty() string