suppressBar: SetRefill after i--
Vladimir Bauer
2 years ago
| 34 | 34 |
for i := 0; i < total; i++ {
|
| 35 | 35 |
if err.check(barID) {
|
| 36 | 36 |
msgCh <- fmt.Sprintf("%s at %d, retrying...", err.Error(), i)
|
| 37 | |
bar.SetRefill(int64(i))
|
| 38 | 37 |
err.reset()
|
| 39 | 38 |
i--
|
|
39 |
bar.SetRefill(int64(i))
|
| 40 | 40 |
continue
|
| 41 | 41 |
}
|
| 42 | 42 |
time.Sleep(time.Duration(rand.Intn(10)+1) * max / 10)
|