Skip to content

mbrlabs/clispin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis status Godoc

clispin

Clispin is a Go library, that makes it ridiculously easy to integrate fancy unicode spinners in your app.

Usage

spinner := clispin.New(nil)
spinner.Start(func() {
    // Do your work here. Update spinner text with Print or Printf
    spinner.Printf("Downloading file %d/2", 1)
    time.Sleep(time.Second)
    spinner.Printf("Downloading file %d/2", 2)
    time.Sleep(time.Second)

    spinner.Print("Processing files")
    time.Sleep(time.Second)
    spinner.Print("Done")
})

clispin.New() creates a new spinner. You can pass in a Sprite struct to customize the spinner animation. If no sprite is provided, a default one is chosen.

There are also a couple of sprites included in this library.

Releases

No releases published

Packages

No packages published

Languages