Documentation
¶
Overview ¶
ANSI escape codes
Index ¶
Constants ¶
const EraseLine string = "\x1b[2K"
EraseLine always returns the erase line code as it's used for progress indicators
Variables ¶
This section is empty.
Functions ¶
func AllowDynamic ¶
Allow backspacing and replacing output for e.g. progress indicator?
func DefaultColor ¶
func DefaultColor() string
DefaultColor returns the default color ANSI code if colors are enabled, empty string otherwise
func Dim ¶
func Dim() string
Dim returns the dim ANSI code if colors are enabled, empty string otherwise
func GetColorEnabled ¶
func GetColorEnabled() bool
GetColorEnabled returns whether ANSI color codes are currently enabled
func Green ¶
func Green() string
Green returns the green ANSI code if colors are enabled, empty string otherwise
func Invert ¶
func Invert() string
Invert returns the invert ANSI code if colors are enabled, empty string otherwise
func Red ¶
func Red() string
Red returns the red ANSI code if colors are enabled, empty string otherwise
func Reset ¶
func Reset() string
Reset returns the reset ANSI code if colors are enabled, empty string otherwise
func SetColorEnabled ¶
func SetColorEnabled(enabled bool)
SetColorEnabled controls whether ANSI color codes are output
Types ¶
This section is empty.