spinner

package
v0.0.0-...-b04963e Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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 Spinner

type Spinner struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() *Spinner

New create a Spinner

func (*Spinner) Active

func (s *Spinner) Active() bool

Active whether spinner is currently active.

func (*Spinner) Reset

func (s *Spinner) Reset() *Spinner

Reset the spinner stop channel.

func (*Spinner) Start

func (s *Spinner) Start()

Start will start the spinner. hides the cursor echo -e "\033[?25l" display the cursor echo -e "\033[?25h"

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop stops the spinner.

func (*Spinner) StopWithStatus

func (s *Spinner) StopWithStatus(status string) string

StopWithStatus stops the spinner and using the status instead of the spinner char.

func (*Spinner) WithDelay

func (s *Spinner) WithDelay(delay time.Duration) *Spinner

func (*Spinner) WithEndMsg

func (s *Spinner) WithEndMsg(endMsg string) *Spinner

func (*Spinner) WithPrefix

func (s *Spinner) WithPrefix(prefix string) *Spinner

func (*Spinner) WithSuffix

func (s *Spinner) WithSuffix(suffix string) *Spinner

func (*Spinner) WithWriter

func (s *Spinner) WithWriter(w io.Writer) *Spinner

Jump to

Keyboard shortcuts

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