Codebase list golang-github-vbauerster-mpb / 226d553
SetTotal is only effective for "never complete" bar Vladimir Bauer 4 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
183183 func (b *Bar) SetTotal(total int64, triggerCompleteNow bool) {
184184 select {
185185 case b.operateState <- func(s *bState) {
186 if s.triggerComplete {
187 return
188 }
186189 if total < 0 {
187190 s.total = s.current
188191 } else {