Codebase list golang-github-vbauerster-mpb / 4d4f7aa
cosmetics... Vladimir Bauer 4 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
106106
107107 // Add creates a bar which renders itself by provided filler.
108108 // If `total <= 0` triggering complete event by increment methods is disabled.
109 // Panics if (*Progress) instance is done, i.e. called after (*Progress).Wait().
109 // Panics if *Progress instance is done, i.e. called after (*Progress).Wait().
110110 func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) *Bar {
111111 if filler == nil {
112112 filler = NopStyle().Build()
180180 // After this method has been called, there is no way to reuse *Progress
181181 // instance.
182182 func (p *Progress) Wait() {
183 // wait for user wg, if any
183184 if p.uwg != nil {
184 // wait for user wg
185185 p.uwg.Wait()
186186 }
187187