Codebase list golang-github-vbauerster-mpb / 66ffcef
consistent doc comments Vladimir Bauer 4 years ago
2 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
6161 extender extenderFunc
6262 debugOut io.Writer
6363
64 // afterBar is a key for *pState.parkedBars
64 // afterBar is a key for (*pState).queueBars
6565 afterBar *Bar
6666 }
6767
6060 }
6161
6262 // New creates new Progress container instance. It's not possible to
63 // reuse instance after *Progress.Wait() method has been called.
63 // reuse instance after (*Progress).Wait method has been called.
6464 func New(options ...ContainerOption) *Progress {
6565 return NewWithContext(context.Background(), options...)
6666 }
6767
6868 // NewWithContext creates new Progress container instance with provided
69 // context. It's not possible to reuse instance after *Progress.Wait()
69 // context. It's not possible to reuse instance after (*Progress).Wait
7070 // method has been called.
7171 func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress {
7272 s := &pState{
113113
114114 // Add creates a bar which renders itself by provided filler.
115115 // If `total <= 0` trigger complete event is disabled until reset with *bar.SetTotal(int64, bool).
116 // Panics if *Progress instance is done, i.e. called after *Progress.Wait().
116 // Panics if *Progress instance is done, i.e. called after (*Progress).Wait.
117117 func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) *Bar {
118118 if filler == nil {
119119 filler = NopStyle().Build()