croc/vendor/github.com/schollz/progressbar
Zack Scholl bab9ceb1bb Update progressbar 2017-10-31 05:41:29 -06:00
..
examples Update progressbar 2017-10-31 05:41:29 -06:00
.travis.yml Update dependencies 2017-10-27 04:56:51 -06:00
LICENSE Update dependencies 2017-10-27 04:56:51 -06:00
README.md Update progressbar 2017-10-31 05:41:29 -06:00
progressbar.go Update progressbar 2017-10-31 05:41:29 -06:00
progressbar_test.go Update progressbar 2017-10-31 05:41:29 -06:00

progressbar

travis go report card coverage godocs

A very simple thread-safe progress bar which should work on every OS without problems. I needed a progressbar for croc and everything I tried had problems, so I made another one.

Example of progress bar

Install

go get -u github.com/schollz/progressbar

Usage

Basic usage:

bar := progressbar.New(100)
for i := 0; i < 100; i++ {
    bar.Add(1)
    time.Sleep(10 * time.Millisecond)
}

which looks like:

 100% |████████████████████████████████████████| [1s:0s]            

The times at the end show the elapsed time and the remaining time, respectively.

Contributing

Pull requests are welcome. Feel free to...

  • Revise documentation
  • Add new features
  • Fix bugs
  • Suggest improvements

License

MIT