Versions in this module Expand all Collapse all v6 v6.0.0 Jan 6, 2023 Changes in this version + var DefaultLengthTracker = 20 + var DefaultUpdateFrequency = time.Millisecond * 250 + var StyleBlocks = Style + var StyleCharsBlocks = StyleChars + var StyleCharsCircle = StyleChars + var StyleCharsDefault = StyleChars + var StyleCharsRhombus = StyleChars + var StyleCircle = Style + var StyleColorsDefault = StyleColors + var StyleColorsExample = StyleColors + var StyleDefault = Style + var StyleOptionsDefault = StyleOptions + var StyleRhombus = Style + var StyleVisibilityDefault = StyleVisibility + var UnitsBytes = Units + var UnitsCurrencyDollar = Units + var UnitsCurrencyEuro = Units + var UnitsCurrencyPound = Units + var UnitsDefault = Units + func FormatBytes(value int64) string + func FormatNumber(value int64) string + type IndeterminateIndicator struct + Position int + Text string + type IndeterminateIndicatorGenerator func(maxLen int) IndeterminateIndicator + func IndeterminateIndicatorDominoes(duration time.Duration) IndeterminateIndicatorGenerator + func IndeterminateIndicatorMovingBackAndForth(indicator string, duration time.Duration) IndeterminateIndicatorGenerator + func IndeterminateIndicatorMovingLeftToRight(indicator string, duration time.Duration) IndeterminateIndicatorGenerator + func IndeterminateIndicatorMovingRightToLeft(indicator string, duration time.Duration) IndeterminateIndicatorGenerator + func IndeterminateIndicatorPacMan(duration time.Duration) IndeterminateIndicatorGenerator + type Position int + const PositionLeft + const PositionRight + type Progress struct + func (p *Progress) AppendTracker(t *Tracker) + func (p *Progress) AppendTrackers(trackers []*Tracker) + func (p *Progress) IsRenderInProgress() bool + func (p *Progress) Length() int + func (p *Progress) LengthActive() int + func (p *Progress) LengthDone() int + func (p *Progress) LengthInQueue() int + func (p *Progress) Log(msg string, a ...interface{}) + func (p *Progress) Render() + func (p *Progress) SetAutoStop(autoStop bool) + func (p *Progress) SetMessageWidth(width int) + func (p *Progress) SetNumTrackersExpected(numTrackers int) + func (p *Progress) SetOutputWriter(writer io.Writer) + func (p *Progress) SetPinnedMessages(messages ...string) + func (p *Progress) SetSortBy(sortBy SortBy) + func (p *Progress) SetStyle(style Style) + func (p *Progress) SetTrackerLength(length int) + func (p *Progress) SetTrackerPosition(position Position) + func (p *Progress) SetUpdateFrequency(frequency time.Duration) + func (p *Progress) ShowETA(show bool) + func (p *Progress) ShowOverallTracker(show bool) + func (p *Progress) ShowPercentage(show bool) + func (p *Progress) ShowTime(show bool) + func (p *Progress) ShowTracker(show bool) + func (p *Progress) ShowValue(show bool) + func (p *Progress) Stop() + func (p *Progress) Style() *Style + type SortBy int + const SortByMessage + const SortByMessageDsc + const SortByNone + const SortByPercent + const SortByPercentDsc + const SortByValue + const SortByValueDsc + func (sb SortBy) Sort(trackers []*Tracker) + type Style struct + Chars StyleChars + Colors StyleColors + Name string + Options StyleOptions + Visibility StyleVisibility + type StyleChars struct + BoxLeft string + BoxRight string + Finished string + Finished25 string + Finished50 string + Finished75 string + Indeterminate IndeterminateIndicatorGenerator + Unfinished string + type StyleColors struct + Error text.Colors + Message text.Colors + Percent text.Colors + Pinned text.Colors + Speed text.Colors + Stats text.Colors + Time text.Colors + Tracker text.Colors + Value text.Colors + type StyleOptions struct + DoneString string + ETAPrecision time.Duration + ETAString string + ErrorString string + PercentFormat string + PercentIndeterminate string + Separator string + SnipIndicator string + SpeedOverallFormatter UnitsFormatter + SpeedPosition Position + SpeedPrecision time.Duration + SpeedSuffix string + TimeDonePrecision time.Duration + TimeInProgressPrecision time.Duration + TimeOverallPrecision time.Duration + type StyleVisibility struct + ETA bool + ETAOverall bool + Percentage bool + Pinned bool + Speed bool + SpeedOverall bool + Time bool + Tracker bool + TrackerOverall bool + Value bool + type Tracker struct + ExpectedDuration time.Duration + Message string + Total int64 + Units Units + func (t *Tracker) ETA() time.Duration + func (t *Tracker) Increment(value int64) + func (t *Tracker) IncrementWithError(value int64) + func (t *Tracker) IsDone() bool + func (t *Tracker) IsErrored() bool + func (t *Tracker) IsIndeterminate() bool + func (t *Tracker) MarkAsDone() + func (t *Tracker) MarkAsErrored() + func (t *Tracker) PercentDone() float64 + func (t *Tracker) Reset() + func (t *Tracker) SetValue(value int64) + func (t *Tracker) UpdateMessage(msg string) + func (t *Tracker) UpdateTotal(total int64) + func (t *Tracker) Value() int64 + type Units struct + Formatter UnitsFormatter + Notation string + NotationPosition UnitsNotationPosition + func (tu Units) Sprint(value int64) string + type UnitsFormatter func(value int64) string + type UnitsNotationPosition int + const UnitsNotationPositionAfter + const UnitsNotationPositionBefore + type Writer interface + AppendTracker func(tracker *Tracker) + AppendTrackers func(trackers []*Tracker) + IsRenderInProgress func() bool + Length func() int + LengthActive func() int + LengthDone func() int + LengthInQueue func() int + Log func(msg string, a ...interface{}) + Render func() + SetAutoStop func(autoStop bool) + SetMessageWidth func(width int) + SetNumTrackersExpected func(numTrackers int) + SetOutputWriter func(output io.Writer) + SetPinnedMessages func(messages ...string) + SetSortBy func(sortBy SortBy) + SetStyle func(style Style) + SetTrackerLength func(length int) + SetTrackerPosition func(position Position) + SetUpdateFrequency func(frequency time.Duration) + ShowETA func(show bool) + ShowOverallTracker func(show bool) + ShowPercentage func(show bool) + ShowTime func(show bool) + ShowTracker func(show bool) + ShowValue func(show bool) + Stop func() + Style func() *Style + func NewWriter() Writer