spinner

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package spinner provides a simple progress spinner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spinner

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

Spinner is a tiny spinner implementation

func New

func New(writer io.Writer) *Spinner

New creates a spinner for the given destination. The spinner starts non-spinning, there is no output until Start() is called.

func (*Spinner) Start

func (s *Spinner) Start(prompt ...string)

Start makes the spinner go round. Providing a prompt will print it before the spinner.

func (*Spinner) Stop

func (s *Spinner) Stop(message ...string)

Stop stops the spinner and optionally prints an ending message.

Jump to

Keyboard shortcuts

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