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 Italic(msg interface{}, styles ...string) string
- func Magenta(msg interface{}, styles ...string) string
- func MagentaBg(msg interface{}, styles ...string) string
- func Output() io.Writer
- func Print(args ...interface{})
- func Printf(format string, args ...interface{})
- func Println(args ...interface{})
- func Red(msg interface{}, styles ...string) string
- func RedBg(msg interface{}, styles ...string) string
- func Reset(msg interface{}, styles ...string) string
- func SetOutput(w io.Writer)
- 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) Output() io.Writer
- func (c *Color) Print(args ...interface{})
- func (c *Color) Printf(format string, args ...interface{})
- func (c *Color) Println(args ...interface{})
- 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) SetOutput(w io.Writer)
- 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 Print ¶
func Print(args ...interface{})
Print is analogous to `fmt.Print` with termial detection.
func Printf ¶
func Printf(format string, args ...interface{})
Printf is analogous to `fmt.Printf` with termial detection.
Types ¶
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
func (*Color) Print ¶
func (c *Color) Print(args ...interface{})
Print is analogous to `fmt.Print` with termial detection.
Click to show internal directories.
Click to hide internal directories.