Version: v1.2.6 Latest Latest

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 0



Package fidget implements CLI functionality for bored users waiting for results



This section is empty.


This section is empty.


This section is empty.


type Spinner

type Spinner struct {
	// contains filtered or unexported fields

Spinner is a simple and efficient CLI loading spinner used by kind It is simplistic and assumes that the line length will not change. It is best used indirectly via log.Status (see parent package)

func NewSpinner

func NewSpinner(w io.Writer) *Spinner

NewSpinner initializes and returns a new Spinner that will write to

func (*Spinner) SetPrefix

func (s *Spinner) SetPrefix(prefix string)

SetPrefix sets the prefix to print before the spinner

func (*Spinner) SetSuffix

func (s *Spinner) SetSuffix(suffix string)

SetSuffix sets the suffix to print after the spinner

func (*Spinner) Start

func (s *Spinner) Start()

Start starts the spinner running

func (*Spinner) Stop

func (s *Spinner) Stop()

Stop signals the spinner to stop

func (*Spinner) TimeSpent added in v1.0.0

func (s *Spinner) TimeSpent() string

TimeSpent returns the seconds spent since the spinner first started

Source Files

Jump to

Keyboard shortcuts

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