spinner

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWithSpinner

func RunWithSpinner(message string, operation func() error) error

RunWithSpinner runs a function with a spinner display

func RunWithSpinnerAndSuccess added in v1.2.0

func RunWithSpinnerAndSuccess(message, successMessage string, operation func() error) error

RunWithSpinnerAndSuccess runs a function with a spinner display and custom success message

Types

type SpinnerModel

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

SpinnerModel represents a spinner for API operations

func NewSpinnerModel

func NewSpinnerModel(message string) *SpinnerModel

NewSpinnerModel creates a new spinner model with a custom message

func NewSpinnerModelWithSuccess added in v1.2.0

func NewSpinnerModelWithSuccess(message, successMessage string) *SpinnerModel

NewSpinnerModelWithSuccess creates a new spinner model with custom message and success message

func (SpinnerModel) Init

func (m SpinnerModel) Init() tea.Cmd

Init implements the tea.Model interface

func (SpinnerModel) Update

func (m SpinnerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements the tea.Model interface

func (SpinnerModel) View

func (m SpinnerModel) View() string

View implements the tea.Model interface

Jump to

Keyboard shortcuts

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