SpinGO

GitHub Action GitHub license Go Report Card GoDoc

SpinGO is a very basic library for making progress spinners which has no dependencies.

Demo

Note: Framerate are not fully accurate. Here is another, more accurate demo using asciinema.

Installation

go get -u github.com/talwat/spingo

Usage

spinner := spingo.Spinner{}

for i := 0; i < 100; i++ {
    spinner.DisplaySpinner()
    time.Sleep(40 * time.Millisecond)
}

spinner.End()

Customization

These are fields in the Spinner struct.

Prefix

Prefix to display before the spinner.

Suffix

Suffix to display after the spinner.

SpinnerArt

Spinner art to display, eg. ["/", "|", "\\", "-"]

GitHub

View Github