Codebase list golang-github-vbauerster-mpb / 5d67ed4
don't pass total it's global const Vladimir Bauer 4 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
3131 bar := p.AddBar(total)
3232 switch j {
3333 case n - 1:
34 complete(b, bar, total)
34 complete(b, bar)
3535 default:
3636 wg.Add(1)
3737 go func() {
38 complete(b, bar, total)
38 complete(b, bar)
3939 wg.Done()
4040 }()
4141 }
4545 p.Wait()
4646 }
4747
48 func complete(b *testing.B, bar *Bar, total int) {
48 func complete(b *testing.B, bar *Bar) {
4949 for i := 0; i < total; i++ {
5050 bar.Increment()
5151 }