Documentation
¶
Index ¶
- Constants
- func Apply(color int, style int, format string, a ...interface{}) string
- func Black(style int, format string, a ...interface{}) string
- func Blue(style int, format string, a ...interface{}) string
- func Green(style int, format string, a ...interface{}) string
- func Red(style int, format string, a ...interface{}) string
- func Yellow(style int, format string, a ...interface{}) string
Constants ¶
View Source
const ( FgBlack = iota FgRed FgGreen FgYellow FgBlue FgPurple )
Defines the color of the text
View Source
const ( Regular = iota + 1 Light Highlight Underline )
Defines the style of the text
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply applies a `color` and a `style` to the provided `format` It does this by using ANSI color codes
func Black ¶
Black returns a string with black foreground
func Blue ¶
Blue returns a string with blue foreground
func Green ¶
Green returns a string with green foreground
func Red ¶
Red returns a string with red foreground
Types ¶
This section is empty.
Source Files
¶
- color.go
Click to show internal directories.
Click to hide internal directories.