consistent doc comments
Vladimir Bauer
4 years ago
| 61 | 61 |
extender extenderFunc
|
| 62 | 62 |
debugOut io.Writer
|
| 63 | 63 |
|
| 64 | |
// afterBar is a key for *pState.parkedBars
|
|
64 |
// afterBar is a key for (*pState).queueBars
|
| 65 | 65 |
afterBar *Bar
|
| 66 | 66 |
}
|
| 67 | 67 |
|
| 60 | 60 |
}
|
| 61 | 61 |
|
| 62 | 62 |
// 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.
|
| 64 | 64 |
func New(options ...ContainerOption) *Progress {
|
| 65 | 65 |
return NewWithContext(context.Background(), options...)
|
| 66 | 66 |
}
|
| 67 | 67 |
|
| 68 | 68 |
// 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
|
| 70 | 70 |
// method has been called.
|
| 71 | 71 |
func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress {
|
| 72 | 72 |
s := &pState{
|
|
| 113 | 113 |
|
| 114 | 114 |
// Add creates a bar which renders itself by provided filler.
|
| 115 | 115 |
// 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.
|
| 117 | 117 |
func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) *Bar {
|
| 118 | 118 |
if filler == nil {
|
| 119 | 119 |
filler = NopStyle().Build()
|