Documentation ¶
Index ¶
- type MultiProgressBar
- func (mpb *MultiProgressBar) Add(pBar *progressbar.ProgressBar) *progressbar.ProgressBar
- func (mpb *MultiProgressBar) BarCount() int
- func (mpb *MultiProgressBar) End() error
- func (mpb *MultiProgressBar) Finish() error
- func (mpb *MultiProgressBar) Get(idx int) *progressbar.ProgressBar
- func (mpb *MultiProgressBar) RenderBlank() error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiProgressBar ¶
type MultiProgressBar struct {
// contains filtered or unexported fields
}
func New ¶
func New() *MultiProgressBar
func NewOptions ¶
func NewOptions(options ...Option) *MultiProgressBar
NewOptions creates a new multi progressbar with passed options.
func (*MultiProgressBar) Add ¶
func (mpb *MultiProgressBar) Add(pBar *progressbar.ProgressBar) *progressbar.ProgressBar
Add a progress bar. This will change the writer of the progress bar. Do not change the writer afterwards! Not thread safe. Return the passed progress bar.
func (*MultiProgressBar) BarCount ¶
func (mpb *MultiProgressBar) BarCount() int
func (*MultiProgressBar) End ¶
func (mpb *MultiProgressBar) End() error
End Move cursor to the end of the progress bars. Not thread safe.
func (*MultiProgressBar) Finish ¶
func (mpb *MultiProgressBar) Finish() error
Finish calls Finish on all progress bars. If an error is thrown, Finish might not be called on all bars. This will also call End.
func (*MultiProgressBar) Get ¶
func (mpb *MultiProgressBar) Get(idx int) *progressbar.ProgressBar
Get returns the progressbar.Progressbar with the given index. Will panic if the index does not exist.
func (*MultiProgressBar) RenderBlank ¶
func (mpb *MultiProgressBar) RenderBlank() error
RenderBlank calls RenderBlank on all progress bars. If an error is thrown, RenderBlank might not be called on all bars.
type Option ¶
type Option func(p *MultiProgressBar)
Option is the type all options need to adhere to
func OptionSetWriter ¶
OptionSetWriter sets the output writer. Unknown behaviour if called while using the multi progress bar.