Documentation
¶
Index ¶
- type ProgressBar
- func (pb *ProgressBar) Add(n int64)
- func (pb *ProgressBar) Cancel()
- func (pb *ProgressBar) Done()
- func (pb *ProgressBar) FromReader(r io.Reader, w io.Writer) (int64, error)
- func (pb *ProgressBar) SetRefresh(refresh time.Duration) *ProgressBar
- func (pb *ProgressBar) SetTemplate(tmplt string) (err error)
- func (pb *ProgressBar) SetUnit(unit string) *ProgressBar
- func (pb *ProgressBar) SetWidth(blockWidth int) *ProgressBar
- func (pb *ProgressBar) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
ProgressBar is a simple progress bar.
func New64 ¶
func New64(total int64) *ProgressBar
New64 returns a new ProgressBar with default options.
func (*ProgressBar) Add ¶
func (pb *ProgressBar) Add(n int64)
Add adds the specified amount to the progress bar.
func (*ProgressBar) FromReader ¶
FromReader starts the progress bar from a reader.
func (*ProgressBar) SetRefresh ¶
func (pb *ProgressBar) SetRefresh(refresh time.Duration) *ProgressBar
SetRefresh sets progress bar refresh time for check speed.
func (*ProgressBar) SetTemplate ¶
func (pb *ProgressBar) SetTemplate(tmplt string) (err error)
SetTemplate sets progress bar template.
func (*ProgressBar) SetUnit ¶
func (pb *ProgressBar) SetUnit(unit string) *ProgressBar
SetUnit sets progress bar unit.
func (*ProgressBar) SetWidth ¶
func (pb *ProgressBar) SetWidth(blockWidth int) *ProgressBar
SetWidth sets progress bar block width.
Click to show internal directories.
Click to hide internal directories.