Documentation
¶
Index ¶
- Constants
- Variables
- func ColorCode(code string) int
- func MatchString(regex string, code string) string
- type Color
- func (c *Color) Add(value ...string) *Color
- func (c *Color) Format() string
- func (c *Color) Func(method string) func(args ...interface{})
- func (c *Color) Print(attr ...interface{}) (n int, err error)
- func (c *Color) Printf(format string, attr ...interface{}) (n int, err error)
- func (c *Color) Println(attr ...interface{}) (n int, err error)
- func (c *Color) Sequence() string
- func (c *Color) Set() *Color
- func (c *Color) Unset() *Color
Constants ¶
View Source
const Escape = "\x1b"
Variables ¶
View Source
var BgColors = map[string]int{
"black": black + 40,
"red": red + 40,
"green": green + 40,
"yellow": yellow + 40,
"blue": blue + 40,
"magenta": magenta + 40,
"cyan": cyan + 40,
"white": white + 40,
}
View Source
var FgColors = map[string]int{
"black": black + 30,
"red": red + 30,
"green": green + 30,
"yellow": yellow + 30,
"blue": blue + 30,
"magenta": magenta + 30,
"cyan": cyan + 30,
"white": white + 30,
}
View Source
var Style = map[string]int{
"reset": 0,
"bold": 1,
"faint": 2,
"italic": 3,
"underline": 4,
"blinkslow": 5,
"blinkrapid": 6,
"reverse": 7,
"conceal": 8,
"crossedout": 9,
}
Functions ¶
func MatchString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.