Documentation
¶
Index ¶
- Variables
- func Alert(msg string) string
- func Alertf(msg string, a ...any) string
- func Bg8Bit(color int, a ...any) string
- func Bg8Bitf(color int, format string, a ...any) string
- func Bg24Bit(r int, g int, b int, a ...any) string
- func Bg24Bitf(r int, g int, b int, format string, a ...any) string
- func Black(a ...any) string
- func BlackBg(a ...any) string
- func BlackBgf(format string, a ...any) string
- func Blackf(format string, a ...any) string
- func Blue(a ...any) string
- func BlueBg(a ...any) string
- func BlueBgf(format string, a ...any) string
- func Bluef(format string, a ...any) string
- func Bold(a ...any) string
- func Boldf(format string, a ...any) string
- func Complete(msg string) string
- func Completef(msg string, a ...any) string
- func Cyan(a ...any) string
- func CyanBg(a ...any) string
- func CyanBgf(format string, a ...any) string
- func Cyanf(format string, a ...any) string
- func Dim(a ...any) string
- func Dimf(format string, a ...any) string
- func DoubleUnderline(a ...any) string
- func DoubleUnderlinef(format string, a ...any) string
- func Fail(msg string) string
- func Failf(msg string, a ...any) string
- func Fg8Bit(color int, a ...any) string
- func Fg8Bitf(color int, format string, a ...any) string
- func Fg24Bit(r int, g int, b int, a ...any) string
- func Fg24Bitf(r int, g int, b int, format string, a ...any) string
- func Format(msg string, a ...func(...any) string) string
- func Green(a ...any) string
- func GreenBg(a ...any) string
- func GreenBgf(format string, a ...any) string
- func Greenf(format string, a ...any) string
- func Info(msg string) string
- func Infof(msg string, a ...any) string
- func IntenseBlack(a ...any) string
- func IntenseBlackBg(a ...any) string
- func IntenseBlackBgf(format string, a ...any) string
- func IntenseBlackf(format string, a ...any) string
- func IntenseBlue(a ...any) string
- func IntenseBlueBg(a ...any) string
- func IntenseBlueBgf(format string, a ...any) string
- func IntenseBluef(format string, a ...any) string
- func IntenseCyan(a ...any) string
- func IntenseCyanBg(a ...any) string
- func IntenseCyanBgf(format string, a ...any) string
- func IntenseCyanf(format string, a ...any) string
- func IntenseGreen(a ...any) string
- func IntenseGreenBg(a ...any) string
- func IntenseGreenBgf(format string, a ...any) string
- func IntenseGreenf(format string, a ...any) string
- func IntenseMagenta(a ...any) string
- func IntenseMagentaBg(a ...any) string
- func IntenseMagentaBgf(format string, a ...any) string
- func IntenseMagentaf(format string, a ...any) string
- func IntenseRed(a ...any) string
- func IntenseRedBg(a ...any) string
- func IntenseRedBgf(format string, a ...any) string
- func IntenseRedf(format string, a ...any) string
- func IntenseWhite(a ...any) string
- func IntenseWhiteBg(a ...any) string
- func IntenseWhiteBgf(format string, a ...any) string
- func IntenseWhitef(format string, a ...any) string
- func IntenseYellow(a ...any) string
- func IntenseYellowBg(a ...any) string
- func IntenseYellowBgf(format string, a ...any) string
- func IntenseYellowf(format string, a ...any) string
- func Italic(a ...any) string
- func Italicf(format string, a ...any) string
- func Magenta(a ...any) string
- func MagentaBg(a ...any) string
- func MagentaBgf(format string, a ...any) string
- func Magentaf(format string, a ...any) string
- func Red(a ...any) string
- func RedAlert(msg string) string
- func RedAlertf(msg string, a ...any) string
- func RedBg(a ...any) string
- func RedBgf(format string, a ...any) string
- func Redf(format string, a ...any) string
- func Reverse(a ...any) string
- func Reversef(format string, a ...any) string
- func Strike(a ...any) string
- func Strikef(format string, a ...any) string
- func Underline(a ...any) string
- func Underlinef(format string, a ...any) string
- func Var(variable string, value string) string
- func VarDoubleQuote(variable string, value string) string
- func VarQuote(variable string, value string) string
- func VarSingleQuote(variable string, value string) string
- func White(a ...any) string
- func WhiteBg(a ...any) string
- func WhiteBgf(format string, a ...any) string
- func Whitef(format string, a ...any) string
- func Yellow(a ...any) string
- func YellowBg(a ...any) string
- func YellowBgf(format string, a ...any) string
- func Yellowf(format string, a ...any) string
Constants ¶
This section is empty.
Variables ¶
var ( IconComplete = "[✓]" // IconComplete is the icon for a completed message. IconAlert = "[!]" // IconAlert is the icon for an alerted message. IconFailed = "[✗]" // IconFailed is the icon for a failed message. IconInfo = "[i]" // IconInfo is the icon for an informational message. )
Functions ¶
func Alertf ¶ added in v1.2.0
Alertf returns a string with a yellow exclamation icon and the given formatted message.
func Bg8Bit ¶ added in v1.2.0
Bg8Bit formats using the default formats for its operands and returns the resulting string with an 8-bit background color. Spaces are added between operands when neither is a string.
color must be between 0 and 255 otherwise no color will be applied.
func Bg8Bitf ¶ added in v1.2.0
Bg8Bitf formats according to a format specifier and returns the resulting string with an 8-bit background color.
color must be between 0 and 255 otherwise no color will be applied.
func Bg24Bit ¶ added in v1.2.0
Bg24Bit formats using the default formats for its operands and returns the resulting string with an 24-bit background color. Spaces are added between operands when neither is a string.
r, g, and b must be between 0 and 255 otherwise no color will be applied.
func Bg24Bitf ¶ added in v1.2.0
Bg24Bitf formats according to a format specifier and returns the resulting string with an 24-bit background color.
r, g, and b must be between 0 and 255 otherwise no color will be applied.
func Black ¶
Black formats using the default formats for its operands and returns the resulting string with a black foreground. Spaces are added between operands when neither is a string.
func BlackBg ¶ added in v1.1.0
BlackBg formats using the default formats for its operands and returns the resulting string with a black background. Spaces are added between operands when neither is a string.
func BlackBgf ¶ added in v1.1.0
BlackBgf formats according to a format specifier and returns the resulting string with a black background.
func Blackf ¶
Blackf formats according to a format specifier and returns the resulting string with a black foreground.
func Blue ¶
Blue formats using the default formats for its operands and returns the resulting string with a blue foreground. Spaces are added between operands when neither is a string.
func BlueBg ¶ added in v1.1.0
BlueBg formats using the default formats for its operands and returns the resulting string with a blue background. Spaces are added between operands when neither is a string.
func BlueBgf ¶ added in v1.1.0
BlueBgf formats according to a format specifier and returns the resulting string with a blue background.
func Bluef ¶
Bluef formats according to a format specifier and returns the resulting string with a blue foreground.
func Bold ¶ added in v1.2.0
Bold formats using the default formats for its operands and returns the resulting string in bold. Spaces are added between operands when neither is a string.
func Boldf ¶ added in v1.2.0
Boldf formats according to a format specifier and returns the resulting string in bold.
func Completef ¶ added in v1.2.0
Completef returns a string with a green checkmark icon and the given formatted message.
func Cyan ¶
Cyan formats using the default formats for its operands and returns the resulting string with a cyan foreground. Spaces are added between operands when neither is a string.
func CyanBg ¶ added in v1.1.0
CyanBg formats using the default formats for its operands and returns the resulting string with a cyan background. Spaces are added between operands when neither is a string.
func CyanBgf ¶ added in v1.1.0
CyanBgf formats according to a format specifier and returns the resulting string with a cyan background.
func Cyanf ¶
Cyanf formats according to a format specifier and returns the resulting string with a cyan foreground.
func Dim ¶ added in v1.2.0
Dim formats using the default formats for its operands and returns the resulting string in dim. Spaces are added between operands when neither is a string.
func Dimf ¶ added in v1.2.0
Dimf formats according to a format specifier and returns the resulting string in dim.
func DoubleUnderline ¶ added in v1.2.0
DoubleUnderline formats using the default formats for its operands and returns the resulting string with a double underline. Spaces are added between operands when neither is a string.
func DoubleUnderlinef ¶ added in v1.2.0
DoubleUnderlinef formats according to a format specifier and returns the resulting string with a double underline.
func Failf ¶ added in v1.2.0
Failf returns a string with a red X icon and the given formatted message.
func Fg8Bit ¶ added in v1.2.0
Fg8Bit formats using the default formats for its operands and returns the resulting string with an 8-bit foreground color. Spaces are added between operands when neither is a string.
color must be between 0 and 255 otherwise no color will be applied.
func Fg8Bitf ¶ added in v1.2.0
Fg8Bitf formats according to a format specifier and returns the resulting string with an 8-bit foreground color.
color must be between 0 and 255 otherwise no color will be applied.
func Fg24Bit ¶ added in v1.2.0
Fg24Bit formats using the default formats for its operands and returns the resulting string with an 24-bit foreground color. Spaces are added between operands when neither is a string.
r, g, and b must be between 0 and 255 otherwise no color will be applied.
func Fg24Bitf ¶ added in v1.2.0
Fg24Bitf formats according to a format specifier and returns the resulting string with an 24-bit foreground color.
r, g, and b must be between 0 and 255 otherwise no color will be applied.
func Format ¶ added in v1.2.0
Format applies the given formatting functions to the message in order and returns the resulting string. If no formatting functions are provided, the original message is returned.
func Green ¶
Green formats using the default formats for its operands and returns the resulting string with a green foreground. Spaces are added between operands when neither is a string.
func GreenBg ¶ added in v1.1.0
GreenBg formats using the default formats for its operands and returns the resulting string with a green background. Spaces are added between operands when neither is a string.
func GreenBgf ¶ added in v1.1.0
GreenBgf formats according to a format specifier and returns the resulting string with a green background.
func Greenf ¶
Greenf formats according to a format specifier and returns the resulting string with a green foreground.
func Infof ¶ added in v1.2.0
Infof returns a string with a cyan info icon and the given formatted message.
func IntenseBlack ¶ added in v1.2.0
IntenseBlack formats using the default formats for its operands and returns the resulting string with a intense black (gray) foreground. Spaces are added between operands when neither is a string.
func IntenseBlackBg ¶ added in v1.2.0
IntenseBlackBg formats using the default formats for its operands and returns the resulting string with a intense black background. Spaces are added between operands when neither is a string.
func IntenseBlackBgf ¶ added in v1.2.0
IntenseBlackBgf formats according to a format specifier and returns the resulting string with a intense black background.
func IntenseBlackf ¶ added in v1.2.0
IntenseBlackf formats according to a format specifier and returns the resulting string with a intense black (gray) foreground.
func IntenseBlue ¶ added in v1.2.0
IntenseBlue formats using the default formats for its operands and returns the resulting string with a intense blue foreground. Spaces are added between operands when neither is a string.
func IntenseBlueBg ¶ added in v1.2.0
IntenseBlueBg formats using the default formats for its operands and returns the resulting string with a intense blue background. Spaces are added between operands when neither is a string.
func IntenseBlueBgf ¶ added in v1.2.0
IntenseBlueBgf formats according to a format specifier and returns the resulting string with a intense blue background.
func IntenseBluef ¶ added in v1.2.0
IntenseBluef formats according to a format specifier and returns the resulting string with a intense blue foreground.
func IntenseCyan ¶ added in v1.2.0
IntenseCyan formats using the default formats for its operands and returns the resulting string with a intense cyan foreground. Spaces are added between operands when neither is a string.
func IntenseCyanBg ¶ added in v1.2.0
IntenseCyanBg formats using the default formats for its operands and returns the resulting string with a intense cyan background. Spaces are added between operands when neither is a string.
func IntenseCyanBgf ¶ added in v1.2.0
IntenseCyanBgf formats according to a format specifier and returns the resulting string with a intense cyan background.
func IntenseCyanf ¶ added in v1.2.0
IntenseCyanf formats according to a format specifier and returns the resulting string with a intense cyan foreground.
func IntenseGreen ¶ added in v1.2.0
IntenseGreen formats using the default formats for its operands and returns the resulting string with a intense green foreground. Spaces are added between operands when neither is a string.
func IntenseGreenBg ¶ added in v1.2.0
IntenseGreenBg formats using the default formats for its operands and returns the resulting string with a intense green background. Spaces are added between operands when neither is a string.
func IntenseGreenBgf ¶ added in v1.2.0
IntenseGreenBgf formats according to a format specifier and returns the resulting string with a intense green background.
func IntenseGreenf ¶ added in v1.2.0
IntenseGreenf formats according to a format specifier and returns the resulting string with a intense green foreground.
func IntenseMagenta ¶ added in v1.2.0
IntenseMagenta formats using the default formats for its operands and returns the resulting string with a intense magenta foreground. Spaces are added between operands when neither is a string.
func IntenseMagentaBg ¶ added in v1.2.0
IntenseMagentaBg formats using the default formats for its operands and returns the resulting string with a intense magenta background. Spaces are added between operands when neither is a string.
func IntenseMagentaBgf ¶ added in v1.2.0
IntenseMagentaBgf formats according to a format specifier and returns the resulting string with a intense magenta background.
func IntenseMagentaf ¶ added in v1.2.0
IntenseMagentaf formats according to a format specifier and returns the resulting string with a intense magenta foreground.
func IntenseRed ¶ added in v1.2.0
IntenseRed formats using the default formats for its operands and returns the resulting string with a intense red foreground. Spaces are added between operands when neither is a string.
func IntenseRedBg ¶ added in v1.2.0
IntenseRedBg formats using the default formats for its operands and returns the resulting string with a intense red background. Spaces are added between operands when neither is a string.
func IntenseRedBgf ¶ added in v1.2.0
IntenseRedBgf formats according to a format specifier and returns the resulting string with a intense red background.
func IntenseRedf ¶ added in v1.2.0
IntenseRedf formats according to a format specifier and returns the resulting string with a intense red foreground.
func IntenseWhite ¶ added in v1.2.0
IntenseWhite formats using the default formats for its operands and returns the resulting string with a intense white foreground. Spaces are added between operands when neither is a string.
func IntenseWhiteBg ¶ added in v1.2.0
IntenseWhiteBg formats using the default formats for its operands and returns the resulting string with a intense white background. Spaces are added between operands when neither is a string.
func IntenseWhiteBgf ¶ added in v1.2.0
IntenseWhiteBgf formats according to a format specifier and returns the resulting string with a intense white background.
func IntenseWhitef ¶ added in v1.2.0
IntenseWhitef formats according to a format specifier and returns the resulting string with a intense white foreground.
func IntenseYellow ¶ added in v1.2.0
IntenseYellow formats using the default formats for its operands and returns the resulting string with a intense yellow foreground. Spaces are added between operands when neither is a string.
func IntenseYellowBg ¶ added in v1.2.0
IntenseYellowBg formats using the default formats for its operands and returns the resulting string with a intense yellow background. Spaces are added between operands when neither is a string.
func IntenseYellowBgf ¶ added in v1.2.0
IntenseYellowBgf formats according to a format specifier and returns the resulting string with a intense yellow background.
func IntenseYellowf ¶ added in v1.2.0
IntenseYellowf formats according to a format specifier and returns the resulting string with a intense yellow foreground.
func Italic ¶ added in v1.2.0
Italic formats using the default formats for its operands and returns the resulting string in italic. Spaces are added between operands when neither is a string.
func Italicf ¶ added in v1.2.0
Italicf formats according to a format specifier and returns the resulting string in italic.
func Magenta ¶
Magenta formats using the default formats for its operands and returns the resulting string with a magenta foreground. Spaces are added between operands when neither is a string.
func MagentaBg ¶ added in v1.1.0
MagentaBg formats using the default formats for its operands and returns the resulting string with a magenta background. Spaces are added between operands when neither is a string.
func MagentaBgf ¶ added in v1.1.0
MagentaBgf formats according to a format specifier and returns the resulting string with a magenta background.
func Magentaf ¶
Magentaf formats according to a format specifier and returns the resulting string with a magenta foreground.
func Red ¶
Red formats using the default formats for its operands and returns the resulting string with a red foreground. Spaces are added between operands when neither is a string.
func RedAlertf ¶ added in v1.2.0
RedAlertf returns a string with a red exclamation icon and the given formatted message.
func RedBg ¶ added in v1.1.0
RedBg formats using the default formats for its operands and returns the resulting string with a red background. Spaces are added between operands when neither is a string.
func RedBgf ¶ added in v1.1.0
RedBgf formats according to a format specifier and returns the resulting string with a red background.
func Redf ¶
Redf formats according to a format specifier and returns the resulting string with a red foreground.
func Reverse ¶ added in v1.2.0
Reverse formats using the default formats for its operands and returns the resulting string with reversed foreground and background. Spaces are added between operands when neither is a string.
func Reversef ¶ added in v1.2.0
Reversef formats according to a format specifier and returns the resulting string with reversed foreground and background.
func Strike ¶ added in v1.2.0
Strike formats using the default formats for its operands and returns the resulting string with a strikethrough. Spaces are added between operands when neither is a string.
func Strikef ¶ added in v1.2.0
Strikef formats according to a format specifier and returns the resulting string with a strikethrough.
func Underline ¶ added in v1.2.0
Underline formats using the default formats for its operands and returns the resulting string underlined. Spaces are added between operands when neither is a string.
func Underlinef ¶ added in v1.2.0
Underlinef formats according to a format specifier and returns the resulting string underlined.
func VarDoubleQuote ¶ added in v1.2.0
VarDoubleQuote returns a string with the given variable and value, double quoted.
func VarQuote ¶
VarQuote returns a string with the given variable and value, double quoted. Deprecated: use VarDoubleQuote instead.
func VarSingleQuote ¶ added in v1.2.0
VarSingleQuote returns a string with the given variable and value, single quoted.
func White ¶
White formats using the default formats for its operands and returns the resulting string with a white foreground. Spaces are added between operands when neither is a string.
func WhiteBg ¶ added in v1.1.0
WhiteBg formats using the default formats for its operands and returns the resulting string with a white background. Spaces are added between operands when neither is a string.
func WhiteBgf ¶ added in v1.1.0
WhiteBgf formats according to a format specifier and returns the resulting string with a white background.
func Whitef ¶
Whitef formats according to a format specifier and returns the resulting string with a white foreground.
func Yellow ¶
Yellow formats using the default formats for its operands and returns the resulting string with a yellow foreground. Spaces are added between operands when neither is a string.
func YellowBg ¶ added in v1.1.0
YellowBg formats using the default formats for its operands and returns the resulting string with a yellow background. Spaces are added between operands when neither is a string.
Types ¶
This section is empty.