Codebase list golang-github-vbauerster-mpb / 27996d6
upd godoc for AddBar and AddSpiner Vladimir Bauer 5 years ago
1 changed file(s) with 5 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
9595 return p
9696 }
9797
98 // AddBar creates a new progress bar and adds it to the rendering queue.
98 // AddBar creates a bar with default bar filler. Different filler can
99 // be choosen and applied via `*Progress.Add(...) *Bar` method.
99100 func (p *Progress) AddBar(total int64, options ...BarOption) *Bar {
100101 return p.Add(total, NewBarFiller(BarDefaultStyle), options...)
101102 }
102103
103 // AddSpinner creates a new spinner bar and adds it to the rendering queue.
104 // AddSpinner creates a bar with default spinner filler. Different
105 // filler can be choosen and applied via `*Progress.Add(...) *Bar`
106 // method.
104107 func (p *Progress) AddSpinner(total int64, alignment SpinnerAlignment, options ...BarOption) *Bar {
105108 return p.Add(total, NewSpinnerFiller(SpinnerDefaultStyle, alignment), options...)
106109 }