diff --git a/example/prependETA/main.go b/example/prependETA/main.go index 5ed8b54..6acc66d 100644 --- a/example/prependETA/main.go +++ b/example/prependETA/main.go @@ -19,10 +19,11 @@ p := mpb.New(nil).SetWidth(64) // p := mpb.New(nil).RefreshRate(80 * time.Millisecond).SetWidth(64) - name1 := "Bar#1: " + name1 := "Bar#1:" bar1 := p.AddBar(50). - PrependName(name1, len(name1)).PrependETA(4). - AppendPercentage().TrimRightSpace() + PrependName(name1, 0, mpb.DwidthSync|mpb.DidentRight). + PrependETA(4, mpb.DwidthSync|mpb.DextraSpace). + AppendPercentage(5, 0) wg.Add(1) go func() { @@ -36,8 +37,9 @@ }() bar2 := p.AddBar(100). - PrependName("", 0-len(name1)).PrependETA(4). - AppendPercentage().TrimRightSpace() + PrependName("", 0, mpb.DwidthSync). + PrependETA(4, mpb.DwidthSync|mpb.DextraSpace). + AppendPercentage(5, 0) wg.Add(1) go func() { @@ -51,8 +53,9 @@ }() bar3 := p.AddBar(80). - PrependName("Bar#3: ", 0).PrependETA(4). - AppendPercentage().TrimRightSpace() + PrependName("Bar#3:", 0, mpb.DwidthSync|mpb.DidentRight). + PrependETA(4, mpb.DwidthSync|mpb.DextraSpace). + AppendPercentage(5, 0) wg.Add(1) go func() {