Documentation
¶
Overview ¶
Package spinner implements a small animated spinner on top of charm.land/bubbles/v2/spinner, for use in place of github.com/briandowns/spinner.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner animates a labeled spinner on os.Stderr while a blocking operation runs elsewhere. Call Start to begin animating, then Stop once the operation finishes; Stop clears the spinner's line.
If os.Stderr isn't a terminal, Start instead prints the description once as a plain line, since an animated spinner would be meaningless in redirected or logged output; Stop is then a no-op.
func New ¶
New returns a Spinner labeled with description, using the same frames and cadence as github.com/briandowns/spinner's CharSets[9].