Documentation
¶
Overview ¶
Package ansi provides ANSI escape utilities for rendering styled text to the output.
Index ¶
- Constants
- func Black() string
- func BlackBg() string
- func BlinkFast() string
- func BlinkOff() string
- func BlinkSlow() string
- func Blue() string
- func BlueBg() string
- func Bold() string
- func BoldOff() string
- func Conceal() string
- func CrossedOut() string
- func CrossedOutOff() string
- func CursorBackward(n int) string
- func CursorDown(n int) string
- func CursorForward(n int) string
- func CursorStart(n int) string
- func CursorUp(n int) string
- func Cyan() string
- func CyanBg() string
- func DefaultBg() string
- func DefaultColor() string
- func EraseDisplay(code int) string
- func EraseLine(code int) string
- func Faint() string
- func FaintOff() string
- func GetCursorPosition() string
- func Green() string
- func GreenBg() string
- func HideCursor() string
- func ImageNegative() string
- func ImagePositive() string
- func Italic() string
- func ItalicOff() string
- func Magenta() string
- func MagentaBg() string
- func Red() string
- func RedBg() string
- func Reset() string
- func RestoreCursorPosition() string
- func Reveal() string
- func SaveCursorPosition() string
- func SelectGraphicsRendition(code int) string
- func ShowCursor() string
- func Underline() string
- func UnderlineOff() string
- func White() string
- func WhiteBg() string
- func Yellow() string
- func YellowBg() string
- type LoaderControl
Constants ¶
const Esc = "\u001B"
Esc is the default ANSI escape prefix
Variables ¶
This section is empty.
Functions ¶
func CrossedOutOff ¶
func CrossedOutOff() string
CrossedOutOff removes the strike-through from the text.
func CursorBackward ¶
CursorBackward moves the cursor backwards by `n` columns
func CursorForward ¶
CursorForward moves the cursor forward by `n` columns
func EraseLine ¶
EraseLine clears part of the line. If `n` is zero, clears the cursor to the end of the line. If `n` is one, clear from cursor to beginning of the line. If `n` is two, clear entire line. Cursor position does not change
func GetCursorPosition ¶
func GetCursorPosition() string
GetCursorPosition retrieves the cursor position
func Italic ¶
func Italic() string
Italic makes the font italicized. Sometimes treated as inverse. (Not widely supported)
func RestoreCursorPosition ¶
func RestoreCursorPosition() string
RestoreCursorPosition restores the cursor position
func SaveCursorPosition ¶
func SaveCursorPosition() string
SaveCursorPosition saves the current cursor position
func SelectGraphicsRendition ¶
SelectGraphicsRendition sets the SGR parameters.
Types ¶
type LoaderControl ¶
type LoaderControl struct {
// contains filtered or unexported fields
}
LoaderControl holds internal data for the loader
func Loader ¶
func Loader(anim []string, speed int) *LoaderControl
Loader creates a new loader with the given `anim` that animates at the specified `speed`
func (*LoaderControl) SetValue ¶
func (loader *LoaderControl) SetValue(value string)
SetValue will set a new value for the label
