Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(ctxDone <-chan struct{}, disabled bool, opts ...ComponentOption) (stop func())
Start starts a spinner in stderr and returns an idempotent stop function. Callers must provide a channel to ensure the spinner eventually stops.
Types ¶
type ComponentOption ¶
type ComponentOption func(*spinnerComponentOptions)
ComponentOption configures the spinner component behavior.
func WithDesign ¶
func WithDesign(design spinner.Spinner) ComponentOption
func WithMessage ¶
func WithMessage(message string) ComponentOption
type Handle ¶
type Handle interface {
Stop()
SetMessage(message string)
}
Handle allows callers to update the spinner's message and stop it.
func NewNoopHandle ¶
func NewNoopHandle() Handle
NewNoopHandle returns a handle that performs no work.
func StartWithHandle ¶
func StartWithHandle(ctxDone <-chan struct{}, disabled bool, opts ...ComponentOption) Handle
StartWithHandle starts a spinner and returns a handle that can update the message and stop the spinner.
Click to show internal directories.
Click to hide internal directories.