Codebase list golang-github-vbauerster-mpb / c0c6d90
param rename Vladimir Bauer 7 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
175175 }
176176
177177 // SetTotal sets total dynamically.
178 // Set toComplete to true, to trigger bar complete event now.
179 func (b *Bar) SetTotal(total int64, toComplete bool) {
178 // Set complete to true, to trigger bar complete event now.
179 func (b *Bar) SetTotal(total int64, complete bool) {
180180 select {
181181 case b.operateState <- func(s *bState) {
182182 s.total = total
183 if toComplete && !s.toComplete {
183 if complete && !s.toComplete {
184184 s.current = s.total
185185 s.toComplete = true
186186 go b.refreshNowTillShutdown()