Documentation
¶
Index ¶
- Variables
- func Black(content ...interface{}) string
- func BlackBG(content ...interface{}) string
- func Blink(content ...interface{}) string
- func Blue(content ...interface{}) string
- func BlueBG(content ...interface{}) string
- func Bold(content ...interface{}) string
- func ClearBegin() string
- func ClearEnd() string
- func ClearLeft() string
- func ClearLine() string
- func ClearRight() string
- func ClearScreen() string
- func ClearScreenBuffer() string
- func Color256(color int, content ...interface{}) string
- func Color256BG(color int, content ...interface{}) string
- func ColorTrue(r, g, b int, content ...interface{}) string
- func ColorTrueBG(r, g, b int, content ...interface{}) string
- func Conceal(content ...interface{}) string
- func Cyan(content ...interface{}) string
- func CyanBG(content ...interface{}) string
- func DoubleUnderscore(content ...interface{}) string
- func Down() string
- func DownX(x int) string
- func EnableANSI()
- func Faint(content ...interface{}) string
- func FastBlink(content ...interface{}) string
- func Font(font int, content ...interface{}) string
- func Fraktur(content ...interface{}) string
- func GetLengthWithoutCodes(content string) int
- func Green(content ...interface{}) string
- func GreenBG(content ...interface{}) string
- func Italic(content ...interface{}) string
- func Left() string
- func LeftX(x int) string
- func Link(target url.URL, text string) string
- func LinkFile(file string, label string) string
- func LinkString(target string, text string) string
- func Magenta(content ...interface{}) string
- func MagentaBG(content ...interface{}) string
- func MoveCursor(x, y int) string
- func OverrideNoColor()
- func Red(content ...interface{}) string
- func RedBG(content ...interface{}) string
- func Reset() string
- func RestorePos() string
- func ReverseVideo(content ...interface{}) string
- func Right() string
- func RightX(x int) string
- func SavePos() string
- func SetBlack() string
- func SetBlackBG() string
- func SetBlink() string
- func SetBlue() string
- func SetBlueBG() string
- func SetBold() string
- func SetColor256(color int) string
- func SetColor256BG(color int) string
- func SetColorTrue(r, g, b int) string
- func SetColorTrueBG(r, g, b int) string
- func SetConceal() string
- func SetCyan() string
- func SetCyanBG() string
- func SetDoubleUnderscore() string
- func SetFaint() string
- func SetFastBlink() string
- func SetFont(font int) string
- func SetFraktur() string
- func SetGreen() string
- func SetGreenBG() string
- func SetItalic() string
- func SetMagenta() string
- func SetMagentaBG() string
- func SetRed() string
- func SetRedBG() string
- func SetReverseVideo() string
- func SetStrikethrough() string
- func SetUnderscore() string
- func SetWhite() string
- func SetWhiteBG() string
- func SetYellow() string
- func SetYellowBG() string
- func Strikethrough(content ...interface{}) string
- func StripString(str string) string
- func Underscore(content ...interface{}) string
- func UnsetBlack() string
- func UnsetBlackBG() string
- func UnsetBlink() string
- func UnsetBold() string
- func UnsetConceal() string
- func UnsetDoubleUnderscore() string
- func UnsetFaint() string
- func UnsetFastBlink() string
- func UnsetFont() string
- func UnsetFraktur() string
- func UnsetItalic() string
- func UnsetReverseVideo() string
- func UnsetStrikethrough() string
- func UnsetUnderscore() string
- func Up() string
- func UpX(x int) string
- func White(content ...interface{}) string
- func WhiteBG(content ...interface{}) string
- func Yellow(content ...interface{}) string
- func YellowBG(content ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
var UnsetBlue func() string = UnsetBlack
UnsetBlue resets the foreground color from blue to default.
var UnsetBlueBG func() string = UnsetBlackBG
UnsetBlueBG resets the background color from blue to default.
var UnsetColor256 func() string = UnsetBlack
UnsetColor256 resets the color
var UnsetColor256BG func() string = UnsetBlackBG
UnsetColor256BG resets the background color
var UnsetColorTrue func() string = UnsetBlack
UnsetColorTrue removes the RGB-color
var UnsetColorTrueBG func() string = UnsetBlackBG
UnsetColorTrueBG removes the RGB-background
var UnsetCyan func() string = UnsetBlack
UnsetCyan resets the foreground color from cyan to default.
var UnsetCyanBG func() string = UnsetBlackBG
UnsetCyanBG resets the background color from cyan to default.
var UnsetGreen func() string = UnsetBlack
UnsetGreen resets the foreground color from green to default.
var UnsetGreenBG func() string = UnsetBlackBG
UnsetGreenBG resets the background color from green to default.
var UnsetMagenta func() string = UnsetBlack
UnsetMagenta resets the foreground color from magenta to default.
var UnsetMagentaBG func() string = UnsetBlackBG
UnsetMagentaBG resets the background color from magenta to default.
var UnsetRed func() string = UnsetBlack
UnsetRed resets the foreground color from red to default.
var UnsetRedBG func() string = UnsetBlackBG
UnsetRedBG resets the background color from red to default.
var UnsetWhite func() string = UnsetBlack
UnsetWhite resets the foreground color from white to default.
var UnsetWhiteBG func() string = UnsetBlackBG
UnsetWhiteBG resets the background color from white to default.
var UnsetYellow func() string = UnsetBlack
UnsetYellow resets the foreground color from yellow to default.
var UnsetYellowBG func() string = UnsetBlackBG
UnsetYellowBG resets the background color from yellow to default.
Functions ¶
func Black ¶
func Black(content ...interface{}) string
Black wraps the content in ANSI codes to make its foreground color black
func BlackBG ¶
func BlackBG(content ...interface{}) string
BlackBG wraps the content in ANSI codes to make its background color black
func Blink ¶
func Blink(content ...interface{}) string
Blink is equivalent to SetBlink() + content + UnsetBlink(), content will thereby blink.
func Blue ¶
func Blue(content ...interface{}) string
Blue wraps the content in ANSI codes to make its foreground color blue
func BlueBG ¶
func BlueBG(content ...interface{}) string
BlueBG wraps the content in ANSI codes to make its background color blue
func Bold ¶
func Bold(content ...interface{}) string
Bold is equivalent to SetBold() + content + UnsetBold(), content will thereby be printed in bold.
func ClearLeft ¶
func ClearLeft() string
ClearLeft clears all characters left of the cursor from the display
func ClearRight ¶
func ClearRight() string
ClearRight clears all characters right of the cursor from the display
func ClearScreen ¶
func ClearScreen() string
ClearScreen clears the entire screen and moves the cursor to (0;0)
func ClearScreenBuffer ¶
func ClearScreenBuffer() string
ClearScreenBuffer clears the entire screen and the screenbuffer
func Color256BG ¶
Color256BG sets a Term256 color that is applied to the provided text as the background color
func ColorTrueBG ¶
ColorTrueBG sets a RGB-Color that is set as the background color, writes the text and clears the background color
func Conceal ¶
func Conceal(content ...interface{}) string
Conceal is equivalent to SetConceal() + content + UnsetConceal(), content will thereby be displayed as spaces. It will still be visible if written to a file
func Cyan ¶
func Cyan(content ...interface{}) string
Cyan wraps the content in ANSI codes to make its foreground color cyan
func CyanBG ¶
func CyanBG(content ...interface{}) string
CyanBG wraps the content in ANSI codes to make its background color cyan
func DoubleUnderscore ¶
func DoubleUnderscore(content ...interface{}) string
DoubleUnderscore is equivalent to SetDoubleUnderscore() + content + UnsetDoubleUnderscore(), content will thereby be double-underscored.
func EnableANSI ¶
func EnableANSI()
EnableANSI allows windows terminals to also enjoy the beauty of formatted output. This is not in the init function to prevent messing with the users environment. On other OSes this function does absolutely nothing but does still exist to allow easy cross-platform development. If you are on any OS other than Windows and your Terminal does not support ANSI Sequences I'd reccomend you get a normal terminal emulator.
func Faint ¶
func Faint(content ...interface{}) string
Faint is equivalent to SetFaint() + content + UnsetFaint(), content will thereby be printed in a less intense color.
func FastBlink ¶
func FastBlink(content ...interface{}) string
FastBlink is equivalent to SetFastBlink() + content + UnsetFastBlink(), content will thereby blink fast.
func Fraktur ¶
func Fraktur(content ...interface{}) string
Fraktur is equivalent to SetFraktur() + content + UnsetFraktur(), content will thereby be printed in Frakturschrift. This is very rarely support.
func GetLengthWithoutCodes ¶
func Green ¶
func Green(content ...interface{}) string
Green wraps the content in ANSI codes to make its foreground color green
func GreenBG ¶
func GreenBG(content ...interface{}) string
GreenBG wraps the content in ANSI codes to make its background color green
func Italic ¶
func Italic(content ...interface{}) string
Italic is equivalent to SetItalic() + content + UnsetItalic(), content will thereby be italic.
func Left ¶
func Left() string
Left moves the cursor Left one row. As far as I am aware the correct term is "backward". Please be wary of potential implications in RTL context.
func LeftX ¶
LeftX moves the cursor Left x rows. As far as I am aware the correct term is "backward". Please be wary of potential implications in RTL context.
func Link ¶
Link creates a terminal Hyperlink that can be clicked, if the terminal emulator supports it.
func LinkString ¶
func Magenta ¶
func Magenta(content ...interface{}) string
Magenta wraps the content in ANSI codes to make its foreground color magenta
func MagentaBG ¶
func MagentaBG(content ...interface{}) string
MagentaBG wraps the content in ANSI codes to make its background color magenta
func OverrideNoColor ¶
func OverrideNoColor()
OverrideNoColor allows re-enabling color codes if the user explicitly enabled it by means of a configuration entry or commandline flag.
func Red ¶
func Red(content ...interface{}) string
Red wraps the content in ANSI codes to make its foreground color red
func RedBG ¶
func RedBG(content ...interface{}) string
RedBG wraps the content in ANSI codes to make its background color red
func Reset ¶
func Reset() string
Reset clears all colors and styles (bold, underscore, blink, concealed)
func RestorePos ¶
func RestorePos() string
RestorePos restores the cursor position from the void. (see SavePos for more)
func ReverseVideo ¶
func ReverseVideo(content ...interface{}) string
ReverseVideo is equivalent to SetReverseVideo() + content + UnsetReverseVideo(), content will thereby be inverted. This means that the background color and the foreground color will be switched.
func Right ¶
func Right() string
Right moves the cursor right one row. As far as I am aware the correct term is "forward". Please be wary of potential implications in RTL context.
func RightX ¶
RightX moves the cursor right x rows. As far as I am aware the correct term is "forward". Please be wary of potential implications in RTL context.
func SavePos ¶
func SavePos() string
SavePos stores the current cursor position god knows where to allow restoring it.
func SetColor256 ¶
SetColor256 writes the following text on the specified term256 color
func SetColor256BG ¶
SetColor256BG writes the following text on the specified background color
func SetColorTrue ¶
SetColorTrue sets a RGB-Color for the font
func SetColorTrueBG ¶
SetColorTrueBG sets a RGB-Color for the background
func SetDoubleUnderscore ¶
func SetDoubleUnderscore() string
SetDoubleUnderscore makes the following text become underscored
func SetFraktur ¶
func SetFraktur() string
SetFraktur makes the following text be printed printed in Frakturschrift
func SetReverseVideo ¶
func SetReverseVideo() string
SetReverseVideo makes the following text become inverted.
func SetStrikethrough ¶
func SetStrikethrough() string
SetStrikethrough makes the following text crossed out
func SetUnderscore ¶
func SetUnderscore() string
SetUnderscore makes the text following become underlined
func Strikethrough ¶
func Strikethrough(content ...interface{}) string
Strikethrough is equivalent to SetStrikethrough() + content + UnsetStrikethrough(), content will thereby be displayed as crossed out
func StripString ¶
StripString removes all ANSI-Escape sequences from the given string and returns the cleaned version
func Underscore ¶
func Underscore(content ...interface{}) string
Underscore is equivalent to SetUnderscore() + content + UnsetUnderscore(), content will thereby be underscored.
func UnsetBlack ¶
func UnsetBlack() string
UnsetBlack resets the foreground color from black to default.
func UnsetBlackBG ¶
func UnsetBlackBG() string
UnsetBlackBG resets the background color from black to default.
func UnsetDoubleUnderscore ¶
func UnsetDoubleUnderscore() string
UnsetDoubleUnderscore removes the double-underscore attribute
func UnsetStrikethrough ¶
func UnsetStrikethrough() string
UnsetStrikethrough removes the strikethrough property
func UnsetUnderscore ¶
func UnsetUnderscore() string
UnsetUnderscore removes the underscore property
func White ¶
func White(content ...interface{}) string
White wraps the content in ANSI codes to make its foreground color white
func WhiteBG ¶
func WhiteBG(content ...interface{}) string
WhiteBG wraps the content in ANSI codes to make its background color white
Types ¶
This section is empty.