Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBarChar = "■"
View Source
const DefaultBarSize = 80
View Source
const DefaultFormat = "%prog%% |%bar%| %curr%/%max% [%eta%, %spd%it/s]"
Default values
View Source
const DefaultStep = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
func NewProgressBar ¶
func NewProgressBar(format string, max int64, size int, char string) *ProgressBar
func (*ProgressBar) Reset ¶
func (pb *ProgressBar) Reset()
func (*ProgressBar) SetProgress ¶
func (pb *ProgressBar) SetProgress(prog int64)
func (*ProgressBar) Step ¶
func (pb *ProgressBar) Step()
type ProgressIterator ¶
type ProgressIterator[T any] struct { // contains filtered or unexported fields }
func NewProgressIterator ¶
func NewProgressIterator[T any](iter []T, progress *ProgressBar) *ProgressIterator[T]
func (*ProgressIterator[T]) Iter ¶
func (it *ProgressIterator[T]) Iter() <-chan T
func (*ProgressIterator[T]) Next ¶
func (it *ProgressIterator[T]) Next() (T, bool)
func (*ProgressIterator[T]) Reset ¶
func (it *ProgressIterator[T]) Reset()
type RangeIteratorImpl ¶
type RangeIteratorImpl struct {
// contains filtered or unexported fields
}
func NewRangeIterator ¶
func NewRangeIterator(start, end, step int, format string, size int, char string) *RangeIteratorImpl
func RangeIterator ¶
func RangeIterator(start, end int) *RangeIteratorImpl
func StepRangeIterator ¶
func StepRangeIterator(start, end, step int) *RangeIteratorImpl
func (*RangeIteratorImpl) Iter ¶
func (ri *RangeIteratorImpl) Iter() <-chan int
func (*RangeIteratorImpl) Next ¶
func (ri *RangeIteratorImpl) Next() (int, bool)
Click to show internal directories.
Click to hide internal directories.