Documentation ¶
Index ¶
- Constants
- func Black(format string, a ...interface{}) string
- func Blue(format string, a ...interface{}) string
- func Cyan(format string, a ...interface{}) string
- func Format(param Attribute, format string, a ...interface{}) string
- func Green(format string, a ...interface{}) string
- func Magenta(format string, a ...interface{}) string
- func Red(format string, a ...interface{}) string
- func White(format string, a ...interface{}) string
- func Yellow(format string, a ...interface{}) string
- type Attribute
- type Formatter
Constants ¶
View Source
const ESC = "\x1b"
Escape is the terminal escape literal
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attribute ¶
type Attribute int
Attribute defines the SGR codes
const ( RESET Attribute = iota BOLD FAINT // Not widely supported ITALIC // Not widely supported UNDERLINE // BLINKSLOW // Less than 150 per min BLINKRAPID // 150+ per minute NEGATIVE // Swap foreground and background CONCEAL // Not widely supported STRIKETHROUGH // Not widely supported )
SGR parameters as specified here: http://en.wikipedia.org/wiki/ANSI_escape_code
Foreground, background, and intense offset
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter represents a formatter with a list of attributes to apply
func NewFormatter ¶
NewFormatter returns a new Formatter with the given params
Click to show internal directories.
Click to hide internal directories.