spinner

package
v1.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSuppressed added in v1.22.0

func IsSuppressed(ctx context.Context) bool

IsSuppressed reports whether ctx was marked by WithSuppressed.

func WithSuppressed added in v1.22.0

func WithSuppressed(ctx context.Context) context.Context

WithSuppressed marks ctx so spinner wrappers skip the animation for requests made under it (used by paginated --all loops that show determinate progress).

Types

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

Spinner displays a braille animation on stderr while work is in progress.

func New

func New(message string) *Spinner

New creates a spinner with the given status message.

func (*Spinner) Start

func (s *Spinner) Start()

Start begins the spinner animation. It is a no-op if stderr is not a TTY or if Start was already called.

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop halts the spinner and clears the line.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL