Documentation
¶
Index ¶
Constants ¶
View Source
const ( FgBlack = iota + 30 FgRed FgGreen FgYellow FgBlue FgMagenta FgCyan FgWhite FgDefault = 39 )
View Source
const ( BgBlack = iota + 40 BgRed BgGreen BgYellow BgBlue BgMagenta BgCyan BgWhite BgDefault = 39 )
View Source
const ( FgLightBlack = iota + 90 FgLightRed FgLightGreen FgLightYellow FgLightBlue FgLightMagenta FgLightCyan FgLightWhite )
View Source
const ( BgLightBlack = iota + 100 BgLightRed BgLightGreen BgLightYellow BgLightBlue BgLightMagenta BgLightCyan BgLightWhite )
View Source
const ( Bold = 1 Dim = 2 Italic = 3 // not always supported Underline = 4 Blink = 5 Reversed = 7 Hide = 8 )
Variables ¶
View Source
var ( Regular = Colorize(FgWhite, BgBlack) Info = Colorize(FgCyan, BgBlack) Warn = Colorize(FgYellow, BgBlack) Error = Colorize(FgRed, BgBlack) Success = Colorize(FgGreen, BgBlack) )
shortcuts Example:
fmt.Println(console.Error("something went %s", "wrong"))
Functions ¶
func Color ¶
Color returns the ANSI escaping for the specified foreground and background colors, as well as modifiers Example:
fmt.Println(console.Color(console.FgGreen, console.BgBlue, console.Bold, console.Underline), "Name", console.Reset())
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.