go-spin: github.com/tj/go-spin Index | Files | Directories

package spin

import "github.com/tj/go-spin"

Index

Package Files

spin.go

Variables

var (
    Box1    = `⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏`
    Box2    = `⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓`
    Box3    = `⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆`
    Box4    = `⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋`
    Box5    = `⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁`
    Box6    = `⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈`
    Box7    = `⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈`
    Spin1   = `|/-\`
    Spin2   = `◴◷◶◵`
    Spin3   = `◰◳◲◱`
    Spin4   = `◐◓◑◒`
    Spin5   = `▉▊▋▌▍▎▏▎▍▌▋▊▉`
    Spin6   = `▌▄▐▀`
    Spin7   = `╫╪`
    Spin8   = `■□▪▫`
    Spin9   = `←↑→↓`
    Default = Box1
)

Spinner types.

type Spinner Uses

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

Spinner is exactly what you think it is.

func New Uses

func New() *Spinner

New returns a spinner initialized with Default frames.

func (*Spinner) Current Uses

func (s *Spinner) Current() string

Current returns the current rune in the sequence.

func (*Spinner) Next Uses

func (s *Spinner) Next() string

Next returns the next rune in the sequence.

func (*Spinner) Reset Uses

func (s *Spinner) Reset()

Reset the spinner to its initial frame.

func (*Spinner) Set Uses

func (s *Spinner) Set(frames string)

Set frames to the given string which must not use spaces.

Directories

PathSynopsis
example

Package spin imports 1 packages (graph) and is imported by 62 packages. Updated 2018-03-24. Refresh now. Tools for package owners.