Documentation
¶
Index ¶
- Variables
- func Black(msg string) string
- func Blue(msg string) string
- func Bold(msg string) string
- func ClearLine()
- func ClearLineLeft()
- func ClearLineRight()
- func ClearScreen()
- func Confirm(raw Raw, prompt string) (value bool)
- func Cyan(msg string) string
- func Default(msg string) string
- func Dim(msg string) string
- func Green(msg string) string
- func HideCursor()
- func Input(raw Raw, prompt string, defaultValue string) (value string)
- func Italic(msg string) string
- func Magenta(msg string) string
- func MoveCursorDown(n int)
- func MoveCursorLeft(n int)
- func MoveCursorRight(n int)
- func MoveCursorTo(x, y int)
- func MoveCursorUp(n int)
- func Red(msg string) string
- func RestoreCursor()
- func SaveCursor()
- func Select(raw Raw, prompt string, items []string) (selected string)
- func ShowCursor()
- func Strikethrough(msg string) string
- func Underline(msg string) string
- func White(msg string) string
- func Yellow(msg string) string
- type Raw
- type Spinner
- type SpinnerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CR = []byte{'\r'} EOL = []byte{'\n'} )
Functions ¶
func ClearLineLeft ¶ added in v0.10.3
func ClearLineLeft()
ClearLineLeft erase the current line from the beginning of the line to the cursor
func ClearLineRight ¶
func ClearLineRight()
ClearLineRight erase the current line from the cursor to the end of the line
func MoveCursorTo ¶ added in v0.8.1
func MoveCursorTo(x, y int)
MoveCursorTo moves the cursor to the specified position.
func RestoreCursor ¶ added in v0.8.1
func RestoreCursor()
RestoreCursor restores the cursor position (DEC).
func SaveCursor ¶ added in v0.8.1
func SaveCursor()
SaveCursor saves the current cursor position (DEC).
func Strikethrough ¶ added in v0.10.3
Types ¶
type Raw ¶ added in v0.9.2
type Raw interface {
Next() byte
}
Raw is an interface for reading raw input.
type Spinner ¶ added in v0.10.2
type Spinner struct {
SpinnerConfig
// contains filtered or unexported fields
}
Spinner is a spinner for terminal apps.
func NewSpinner ¶ added in v0.10.2
func NewSpinner(config SpinnerConfig) *Spinner
NewSpinner creates a new spinner.
type SpinnerConfig ¶ added in v0.10.3
Click to show internal directories.
Click to hide internal directories.