vbauerster / mpb

multi progress bar for Go cli applications
The Unlicense
2.29k stars 123 forks source link

Bar gets completed when using SetTotal with triggerComplete parameter set to true #104

Closed vincedupuis closed 1 year ago

vincedupuis commented 2 years ago

When setting the total dynamically with SetTotal, if the triggerComplete parameter is set to true, the bar will be set to complete right away.

TomerH commented 1 year ago

@vbauerster Hey, First I wanted to thank you for this amazing project I was encountered with this issue also, unless I understood it wrong. If I'm using dynamic total should it mark the bar as completed automatically when current == total? or I need to do it manually. What the purpose of triggerComplete parameter? sounds like a bug..

Thanks :)

vbauerster commented 1 year ago

This is not a bug, it's intended behavior. Refer to _examples/dynTotal/main.go