Documentation ¶
Index ¶
Constants ¶
View Source
const ClearLine = "\r\033[K"
ClearLine go to the beginning of the line and clear it
Variables ¶
View Source
var ( Box1 = `⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏` Box2 = `⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓` Box3 = `⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆` Box4 = `⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋` Box5 = `⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁` Box6 = `⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈` Box7 = `⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈` Spin1 = `|/-\` Spin2 = `◴◷◶◵` Spin3 = `◰◳◲◱` Spin4 = `◐◓◑◒` Spin5 = `▉▊▋▌▍▎▏▎▍▌▋▊▉` Spin6 = `▌▄▐▀` Spin7 = `╫╪` Spin8 = `■□▪▫` Spin9 = `←↑→↓` Spin10 = `⦾⦿` Spin11 = `⌜⌝⌟⌞` Spin12 = `┤┘┴└├┌┬┐` Spin13 = `⇑⇗⇒⇘⇓⇙⇐⇖` Spin14 = `☰☱☳☷☶☴` Spin15 = `䷀䷪䷡䷊䷒䷗䷁䷖䷓䷋䷠䷫` Default = Box1 )
Spinner types.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(s *Spinner)
Option describes an option to override a default when creating a new Spinner.
func WithDoneMessage ¶
WithDoneMessage sets the final message as done.
func WithTimePerFrame ¶
WithTimePerFrame sets how long each frame shall be shown.
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner main type
func New ¶
New creates a Spinner object with the provided text. By default, the Default spinner frames are used, and new frames are rendered every 100 milliseconds. Options can be provided to override these default settings.
Click to show internal directories.
Click to hide internal directories.