diff --git a/examples/io/single/main.go b/examples/io/single/main.go index a5eb2e4..09d6c11 100644 --- a/examples/io/single/main.go +++ b/examples/io/single/main.go @@ -39,11 +39,10 @@ p := mpb.New( mpb.WithWidth(60), - mpb.WithFormat("[=>-|"), mpb.WithRefreshRate(180*time.Millisecond), ) - bar := p.AddBar(size, + bar := p.AddBar(size, mpb.BarStyle("[=>-|"), mpb.PrependDecorators( decor.CountersKibiByte("% 6.1f / % 6.1f"), ), diff --git a/examples/singleBar/main.go b/examples/singleBar/main.go index 7fe249f..c712afb 100644 --- a/examples/singleBar/main.go +++ b/examples/singleBar/main.go @@ -12,8 +12,6 @@ p := mpb.New( // override default (80) width mpb.WithWidth(64), - // override default "[=>-]" format - mpb.WithFormat("╢▌▌░╟"), // override default 120ms refresh rate mpb.WithRefreshRate(180*time.Millisecond), ) @@ -22,6 +20,8 @@ name := "Single Bar:" // adding a single bar bar := p.AddBar(int64(total), + // override default "[=>-]" style + mpb.BarStyle("╢▌▌░╟"), mpb.PrependDecorators( // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), diff --git a/examples/stress/main.go b/examples/stress/main.go index b1e99fb..09d4e55 100644 --- a/examples/stress/main.go +++ b/examples/stress/main.go @@ -20,7 +20,10 @@ func main() { var wg sync.WaitGroup - p := mpb.New(mpb.WithWaitGroup(&wg)) + p := mpb.New( + mpb.WithWaitGroup(&wg), + mpb.WithRefreshRate(50*time.Millisecond), + ) wg.Add(totalBars) for i := 0; i < totalBars; i++ {