Codebase list golang-github-vbauerster-mpb / 658fd28
dynamic is true, if total unknown Vladimir Bauer 8 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
9191 )
9292
9393 func newBar(wg *sync.WaitGroup, id int, total int64, cancel <-chan struct{}, options ...BarOption) *Bar {
94 if total <= 0 {
94 dynamic := total <= 0
95 if dynamic {
9596 total = time.Now().Unix()
9697 }
9798
100101 priority: id,
101102 total: total,
102103 etaAlpha: etaAlpha,
104 dynamic: dynamic,
103105 }
104106
105107 for _, opt := range options {