Go. A spinner (aka loading animation) for terminal in

A Go Lang library to show a spinner as the user waits for any long running job to finish.


a type of tree
donate 15
25.  donate
donate 50
Tweet

A go lang command line tool to show a spinner while you wait for some long running jobs to finish.

This is a simple project but holds a tremendous value to me [❤️],

Experiment

establish chin,

go get -u github.com/adhocore/chin
enter fullscreen mode

exit fullscreen mode

use in go code WaitGroup,

var wg sync.WaitGroup

s := chin.New().WithWait(&wg)
go s.Start()

// invoke some long running task
// (you can also call s.Stop() from that task)
longTask(&wg)

s.Stop()
wg.Wait()
enter fullscreen mode

exit fullscreen mode

See example for more (there is also one without weightgroup).

To run the example: go run examples/main.go

screen

chin


other projects

My other Golang projects you might find interesting and useful:

  • grox – Lightweight, fast and dependency free cron expression parser (due checker), task scheduler and/or daemon for Golang (tested on v1.13 and…)

Experiment

establish chin,

go get -u github.com/adhocore/chin
enter fullscreen mode

exit fullscreen mode

use in go code WaitGroup,

var wg sync.WaitGroup

s := chin.New().WithWait(&wg)
go s.Start()

// invoke some long running task
// (you can also call s.Stop() from that task)
longTask(&wg)

s.Stop()
wg.Wait()
enter fullscreen mode

exit fullscreen mode

See example for more (there is also one without weightgroup).

screen

chin

Feedback?

Just leave a comment here, or open the issue/PR in the repo. Thank you. I

Leave a Comment