Attach a progress indicator quickly on your program.
This is golang reimplementation base on interesting library tqdm.
package main
import (
"github.com/sbwhitecap/tqdm"
. "github.com/sbwhitecap/tqdm/iterators"
"time"
)
func main() {
tqdm.With(Interval(0, 10), "hello", func(v interface{}) (brk bool) {
time.Sleep(1000 * time.Millisecond)
return
})
}
The default output is sent to os.Stderr
. Here is screenshot:
See tqdm's godoc and tqdm/iterators's godoc.
go get -u github.com/sbwhitecap/tqdm
Pull requests are welcome.
- Revising documentation
- Adding new feature
- Sending patch for bug fix
- Suggest for improvement
- This library is licensed under ISC license.