Imported Upstream version 1.0.1

This commit is contained in:
Sébastien Delafond committed 2017-07-18 11:45:29 +02:00
1 parent 1ee35b841d
commit 4f12259bc0
5531 files changed
+1834599 -742844

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
package pb_test
import (
"time"
"gopkg.in/cheggaaa/pb.v1"
)
func Example() {
count := 5000
bar := pb.New(count)
// show percents (by default already true)
bar.ShowPercent = true
// show bar (by default already true)
bar.ShowBar = true
bar.ShowCounters = true
bar.ShowTimeLeft = true
// and start
bar.Start()
for i := 0; i < count; i++ {
bar.Increment()
time.Sleep(time.Millisecond)
}
bar.FinishPrint("The End!")
}