Documentation
¶
Index ¶
Constants ¶
View Source
const ( Complete spinnerStatus = iota Error Suspended Awaiting Progressing )
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
func IsTerminal() bool
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner manages a single spinner
func NewSpinner ¶
func NewSpinner(options SpinnerOptions) *Spinner
NewSpinner creates a new spinner instance.
func (*Spinner) GetMessage ¶
GetMessage returns the current spinner message.
func (*Spinner) SetStatus ¶
func (s *Spinner) SetStatus(status spinnerStatus)
SetStatus defines the status of the spinner.
func (*Spinner) UpdateMessage ¶
UpdateMessage updates the spinner message.
func (*Spinner) UpdateMessagef ¶
UpdateMessagef updates the spinner message with a formatted string.
type SpinnerManager ¶
type SpinnerManager interface {
AddSpinner(msg string) *Spinner
GetSpinners() []*Spinner
SetSpinnersCount(count int)
Start()
Stop()
}
SpinnerManager manages spinners
func NewSpinnerManager ¶
func NewSpinnerManager(ctx context.Context) SpinnerManager
constructor for the SpinnerManager.
type SpinnerOptions ¶
Click to show internal directories.
Click to hide internal directories.