spinner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package spinner provides modern PTerm loading indicators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSpinner

func WithSpinner(msg string, fn func() error) error

WithSpinner runs a function with a spinner

Types

type Spinner

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

Spinner wraps pterm spinner with GitScrum styling

func New

func New(message string) *Spinner

New creates a new spinner with GitScrum styling

func (*Spinner) Error

func (sp *Spinner) Error(msg string)

Error stops spinner with error message

func (*Spinner) Start

func (sp *Spinner) Start()

Start shows the spinner

func (*Spinner) Stop

func (sp *Spinner) Stop()

Stop hides the spinner

func (*Spinner) Success

func (sp *Spinner) Success(msg string)

Success stops spinner with success message

func (*Spinner) UpdateSuffix

func (sp *Spinner) UpdateSuffix(message string)

UpdateSuffix changes the spinner text

func (*Spinner) Warning

func (sp *Spinner) Warning(msg string)

Warning stops spinner with warning message

Jump to

Keyboard shortcuts

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