Codebase list golang-github-vbauerster-mpb / 7adf25e
minor: refactoring cancel example Vladimir Bauer 3 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
2222 wg.Add(numBars)
2323
2424 for i := 0; i < numBars; i++ {
25 name := fmt.Sprintf("Bar#%d:", i)
25 name := fmt.Sprintf("Bar#%02d: ", i)
2626 bar := p.AddBar(int64(total),
2727 mpb.PrependDecorators(
28 decor.Name(name),
29 decor.EwmaETA(decor.ET_STYLE_GO, 60, decor.WCSyncSpace),
28 decor.Name(name, decor.WCSyncWidthR),
29 decor.EwmaETA(decor.ET_STYLE_GO, 60, decor.WCSyncWidth),
3030 ),
3131 mpb.AppendDecorators(
3232 // note that OnComplete will not be fired, because of cancel