A library to show customizable progress bar on CUI implemented in Golang.
Porgress-go supports the following features:
- Customizable widgets
- Status update with multi-threads
The following snippet is an example of simple progress bar.
// Create a new progress bar.
// "TASK_SIZE" is the total number of tasks to be processed.
// "BAR_WIDTH" is the width of progress bar.
p := progress.NewSimple(TASK_SIZE, BAR_WIDTH)
p.Show()
for task := 0; task < p.Task(); task++ {
doSomething()
// Make a progress
p.Add(1)
}
// Force to refresh the progress bar and quit.
p.Close()Progress-go also works on multiple threads. Please try running multi.go.
Just execute the following command:
go get github.com/mitsuse/progress-go- Write the docs.
- Support for various platforms.
The license is not decided yet.
