loader

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Arrows = Set{100 * time.Millisecond, []string{"⇢", "⇨", "⇒", "⇉", "⇶"}}

Arrows set

View Source
var Default = Set{50 * time.Millisecond, []string{"+", "\\", "|", "!", "/", "-", "x"}}

Default set

View Source
var Dots = Set{100 * time.Millisecond, []string{".", "·", "•", "¤", "°", "¤", "•", "·"}}

Dots set

View Source
var Moon = Set{100 * time.Millisecond, []string{"🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘"}}

Moon set

Functions

This section is empty.

Types

type Loader

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

Loader is the spinner struct

func New

func New(sets ...Set) *Loader

New gets a new spinner

func (*Loader) Start

func (s *Loader) Start()

Start starts the spinner

func (*Loader) Stop

func (s *Loader) Stop()

Stop stops the spinner

func (*Loader) WithWait

func (s *Loader) WithWait(wg *sync.WaitGroup) *Loader

WithWait attaches a wait group

type Set

type Set struct {
	Delay time.Duration
	Chars []string
}

Set defines animation chars and delay

Jump to

Keyboard shortcuts

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