Skip to content

Commit

Permalink
suppressBar: SetRefill after i--
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Sep 30, 2023
1 parent 5cf3641 commit dcf83c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _examples/suppressBar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ func main() {
for i := 0; i < total; i++ {
if err.check(barID) {
msgCh <- fmt.Sprintf("%s at %d, retrying...", err.Error(), i)
bar.SetRefill(int64(i))
err.reset()
i--
bar.SetRefill(int64(i))
continue
}
time.Sleep(time.Duration(rand.Intn(10)+1) * max / 10)
Expand Down

0 comments on commit dcf83c0

Please sign in to comment.