Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var T_ = func(msgID string) string { return msgID }
T_ translates a message id, no-op by default.
Functions ¶
func SetTranslator ¶
SetTranslator sets the translation function.
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner is a terminal task/progress indicator.
func (*Spinner) Start ¶
func (sp *Spinner) Start()
Start hides the cursor, disables echo and runs the redraw loop.
type TaskUpdate ¶
type TaskUpdate struct {
Name string // stable task id
View string // display text
IsProgress bool // render a percent bar
Percent float64 // current percent (for IsProgress)
DoneText string // completion text (for IsProgress)
Done bool // task finished
}
TaskUpdate is a neutral task update for the spinner.
Click to show internal directories.
Click to hide internal directories.