Documentation ¶
Index ¶
- Constants
- func Black(msg interface{}, styles ...string) string
- func BlackBg(msg interface{}, styles ...string) string
- func Blue(msg interface{}, styles ...string) string
- func BlueBg(msg interface{}, styles ...string) string
- func Bold(msg interface{}, styles ...string) string
- func Cyan(msg interface{}, styles ...string) string
- func CyanBg(msg interface{}, styles ...string) string
- func Dim(msg interface{}, styles ...string) string
- func Disable()
- func Enable()
- func Green(msg interface{}, styles ...string) string
- func GreenBg(msg interface{}, styles ...string) string
- func Grey(msg interface{}, styles ...string) string
- func Hidden(msg interface{}, styles ...string) string
- func Inverse(msg interface{}, styles ...string) string
- func IsTerminal(fd uintptr) bool
- func Italic(msg interface{}, styles ...string) string
- func Magenta(msg interface{}, styles ...string) string
- func MagentaBg(msg interface{}, styles ...string) string
- func NewColorable(file *os.File) io.Writer
- func NewColorableStderr() io.Writer
- func NewColorableStdout() io.Writer
- func Red(msg interface{}, styles ...string) string
- func RedBg(msg interface{}, styles ...string) string
- func Reset(msg interface{}, styles ...string) string
- func Strikeout(msg interface{}, styles ...string) string
- func Underline(msg interface{}, styles ...string) string
- func White(msg interface{}, styles ...string) string
- func WhiteBg(msg interface{}, styles ...string) string
- func Yellow(msg interface{}, styles ...string) string
- func YellowBg(msg interface{}, styles ...string) string
- type Color
- func (c *Color) Black(msg interface{}, styles ...string) string
- func (c *Color) BlackBg(msg interface{}, styles ...string) string
- func (c *Color) Blue(msg interface{}, styles ...string) string
- func (c *Color) BlueBg(msg interface{}, styles ...string) string
- func (c *Color) Bold(msg interface{}, styles ...string) string
- func (c *Color) Cyan(msg interface{}, styles ...string) string
- func (c *Color) CyanBg(msg interface{}, styles ...string) string
- func (c *Color) Dim(msg interface{}, styles ...string) string
- func (c *Color) Disable()
- func (c *Color) Enable()
- func (c *Color) Green(msg interface{}, styles ...string) string
- func (c *Color) GreenBg(msg interface{}, styles ...string) string
- func (c *Color) Grey(msg interface{}, styles ...string) string
- func (c *Color) Hidden(msg interface{}, styles ...string) string
- func (c *Color) Inverse(msg interface{}, styles ...string) string
- func (c *Color) Italic(msg interface{}, styles ...string) string
- func (c *Color) Magenta(msg interface{}, styles ...string) string
- func (c *Color) MagentaBg(msg interface{}, styles ...string) string
- func (c *Color) Red(msg interface{}, styles ...string) string
- func (c *Color) RedBg(msg interface{}, styles ...string) string
- func (c *Color) Reset(msg interface{}, styles ...string) string
- func (c *Color) Strikeout(msg interface{}, styles ...string) string
- func (c *Color) Underline(msg interface{}, styles ...string) string
- func (c *Color) White(msg interface{}, styles ...string) string
- func (c *Color) WhiteBg(msg interface{}, styles ...string) string
- func (c *Color) Yellow(msg interface{}, styles ...string) string
- func (c *Color) YellowBg(msg interface{}, styles ...string) string
Constants ¶
View Source
const ( // Blk Black text style Blk = "30" // Rd red text style Rd = "31" // Grn green text style Grn = "32" // Yel yellow text style Yel = "33" // Blu blue text style Blu = "34" // Mgn magenta text style Mgn = "35" // Cyn cyan text style Cyn = "36" // Wht white text style Wht = "37" // Gry grey text style Gry = "90" // BlkBg black background style BlkBg = "40" // RdBg red background style RdBg = "41" // GrnBg green background style GrnBg = "42" // YelBg yellow background style YelBg = "43" // BluBg blue background style BluBg = "44" // MgnBg magenta background style MgnBg = "45" // CynBg cyan background style CynBg = "46" // WhtBg white background style WhtBg = "47" // R reset emphasis style R = "0" // B bold emphasis style B = "1" // D dim emphasis style D = "2" // I italic emphasis style I = "3" // U underline emphasis style U = "4" // In inverse emphasis style In = "7" // H hidden emphasis style H = "8" // S strikeout emphasis style S = "9" )
Color styles
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
IsTerminal return true if the file descriptor is terminal.
func NewColorableStderr ¶
func NewColorableStdout ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.