spinner

package
v0.0.0-...-f066c3e Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Indent uint `json:"indent,omitempty"`
}

type Spinner

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

Spinner represents a terminal spinner.

func New

func New(text string, opts Options) *Spinner

New returns a new Spinner.

func (*Spinner) Error

func (s *Spinner) Error(text string)

Error stops the spinner with the error message that is specified in the Options.

func (*Spinner) Start

func (s *Spinner) Start()

Start starts the spinner.

func (*Spinner) Success

func (s *Spinner) Success(text string)

Success stops the spinner with the success message that is specified in the Options.

func (*Spinner) Update

func (s *Spinner) Update(text string)

Update replaces the spinner's message with the specified one.

Jump to

Keyboard shortcuts

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