Documentation ¶
Overview ¶
Package spinner provides methods for creating spinner animation for long-running tasks
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DisableAnimation = false
DisableAnimation is global animation off switch flag
View Source
var ErrColorTag = "{r}"
ErrColorTag is cross color tag (see fmtc package)
View Source
var OkColorTag = "{g}"
OkColorTag is check color tag (see fmtc package)
View Source
var SkipColorTag = "{s}"
SkipColorTag is skipped action color tag (see fmtc package)
View Source
var SpinnerColorTag = "{y}"
SpinnerColorTag is spinner animation color tag (see fmtc package)
View Source
var TimeColorTag = "{s-}"
TimeColorTag is time color tag (see fmtc package)
Functions ¶
func Done ¶
func Done(ok bool)
Done finishes spinner animation and shows task status
Example ¶
Show("My long running task with good result") time.Sleep(time.Second) Done(true) Show("My long running task with bad result") time.Sleep(time.Second) Done(false)
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.