Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ( Reset = NewColor(ResetCode) Canary = NewColor(FgHiYellow).Add(Bold) Green = NewColor(FgHiGreen) Whataburger = NewColor(Attribute(color.FgRed)) ATTN = Canary.Add(BgRed) INFO = Green.Add(Bold).Add(Italic).Add(BgHiBlue) )
ANSI color printers
var (
Log = errorlogger.Log
)
var NoColor = color.NoColor
NoColor defines if the output is colorized or not. It's dynamically set to false or true based on the stdout's file descriptor referring to a terminal or not. It's also set to true if the NO_COLOR environment variable is set (regardless of its value). This is a global option and affects all colors. For more control over each color block use the methods DisableColor() individually.
Functions ¶
Types ¶
type Attribute ¶
Attribute defines a single SGR Code
Reference: http://github.com/fatih/color```` (MIT License)
const ( ResetCode Attribute = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut )
Base attributes
Foreground text colors
const ( FgHiBlack Attribute = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite )
Foreground Hi-Intensity text colors
Background text colors
type Color ¶
Color defines a custom color object which is defined by SGR parameters.
Reference: http://github.com/fatih/color (MIT License)