This vendorization uses the new set of API changes which we are brought in. With this new change Bucket regions are handled transparently without any region lookup or local map. This makes overall code seamless and easy to use. Fixes - #1541 (cp corruption while uploading large files to s3) Fixes - #1542 (cp checkCopySyntax failed) Fixes - #1537 (regions will be handled seamelessly now for all buckets) Fixes - #1538 (fixes access control policy for google cloud storage) Fixes - #1547 (session resume completes without copying all the files) Fixes - #1559 (poor network connectivity, causes timing out)
31 lines
440 B
Go
31 lines
440 B
Go
package pb_test
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/cheggaaa/pb"
|
|
)
|
|
|
|
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!")
|
|
}
|