diff --git a/README.md b/README.md index 90d4fe6..3255898 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,11 @@ total := 100 name := "Single Bar:" + style := mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟").Inclusive(0) // adding a single bar, which will inherit container's width bar := p.Add(int64(total), // progress bar filler with customized style - mpb.NewBarFiller(mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟")), + mpb.NewBarFiller(style), 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/singleBar/main.go b/_examples/singleBar/main.go index f0b87a3..c5370ed 100644 --- a/_examples/singleBar/main.go +++ b/_examples/singleBar/main.go @@ -14,10 +14,11 @@ total := 100 name := "Single Bar:" + style := mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟").Inclusive(0) // adding a single bar, which will inherit container's width bar := p.Add(int64(total), // progress bar filler with customized style - mpb.NewBarFiller(mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟")), + mpb.NewBarFiller(style), mpb.PrependDecorators( // display our name with one space on the right decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}),