Codebase list golang-github-vbauerster-mpb / 1af5267
SetTotal: make sure zero value not assigned Vladimir Bauer 8 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
226226 func (b *Bar) SetTotal(total int64, final bool) {
227227 select {
228228 case b.operateState <- func(s *bState) {
229 s.total = total
229 if total != 0 {
230 s.total = total
231 }
230232 s.dynamic = !final
231233 }:
232234 case <-b.done: