Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DisableProgress = false
DisableProgress can be set to true in tests to prevent pterm goroutines from spawning and causing race conditions.
var Out io.Writer = os.Stderr
Out is the writer used for spinner output. Tests may replace it.
Functions ¶
This section is empty.
Types ¶
type MultiSpinner ¶
type MultiSpinner struct {
// contains filtered or unexported fields
}
MultiSpinner manages multiple concurrent spinners.
func NewMultiSpinner ¶
func NewMultiSpinner() (*MultiSpinner, error)
NewMultiSpinner creates a new multi-spinner manager.
func (*MultiSpinner) AddSpinner ¶
func (m *MultiSpinner) AddSpinner(text string) *pterm.SpinnerPrinter
AddSpinner adds a new spinner to the multi-printer display.
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner wraps the mpb.Progress container and a single bar. It's designed to manage a single progress bar and allow logging messages above the bar without disrupting it.
func NewProgressSpinner ¶
NewProgressSpinner creates a spinner that displays progress as a bar.
func NewSpinner ¶
NewSpinner creates a new spinner with a default indeterminate style.
func (*Spinner) SetProgressBar ¶
SetProgressBar sets the progress of the bar. Progress should be from 0.0 to 1.0.
func (*Spinner) Start ¶
func (s *Spinner) Start()
Start does nothing in this implementation, as the bar is visible on creation.
func (*Spinner) Stop ¶
func (s *Spinner) Stop()
Stop marks the bar as completed and waits for the progress container to finish.
func (*Spinner) UpdateMessage ¶
UpdateMessage updates the message displayed next to the spinner/bar.