Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StyleDefaultChars = progress.StyleChars{ BoxLeft: "[", BoxRight: "]", Finished: "#", Finished25: ".", Finished50: ".", Finished75: ".", Indeterminate: progress.IndeterminateIndicatorMovingBackAndForth("<#>", progress.DefaultUpdateFrequency/2), Unfinished: ".", } StyleDefaultColors = progress.StyleColors{ Message: text.Colors{text.FgWhite}, Error: text.Colors{text.FgRed}, Percent: text.Colors{text.FgHiRed}, Pinned: text.Colors{text.BgHiBlack, text.FgWhite, text.Bold}, Stats: text.Colors{text.FgHiBlack}, Time: text.Colors{text.FgGreen}, Tracker: text.Colors{text.FgYellow}, Value: text.Colors{text.FgCyan}, Speed: text.Colors{text.FgMagenta}, } StyleDefaultOptions = progress.StyleOptions{ DoneString: "done!", ErrorString: "fail!", ETAPrecision: time.Second, ETAString: "~ETA", PercentFormat: "%4.2f%%", PercentIndeterminate: " ??? ", Separator: " ... ", SnipIndicator: "~", SpeedPosition: progress.PositionRight, SpeedPrecision: time.Microsecond, SpeedOverallFormatter: progress.FormatNumber, SpeedSuffix: "/s", TimeDonePrecision: time.Millisecond, TimeInProgressPrecision: time.Microsecond, TimeOverallPrecision: time.Second, } )
View Source
var ( StyleDownload = NewStyle("download", progress.StyleVisibility{ ETA: true, ETAOverall: true, Percentage: true, Pinned: false, Speed: true, SpeedOverall: true, Time: true, Tracker: true, TrackerOverall: false, Value: true, }, nil) )
View Source
var ( StyleUnkown = NewStyle("unkown", progress.StyleVisibility{ ETA: false, ETAOverall: false, Percentage: false, Pinned: false, Speed: false, SpeedOverall: false, Time: true, Tracker: true, TrackerOverall: false, Value: false, }, &StyleOverwrites{ TimeInProgressPrecision: time.Second, }) )
Functions ¶
func NewStyle ¶
func NewStyle(name string, visibility progress.StyleVisibility, overwrites *StyleOverwrites) progress.Style
Types ¶
type ReaderCloser ¶
type ReaderCloser struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(body io.ReadCloser, tracker *progress.Tracker) *ReaderCloser
func (*ReaderCloser) Close ¶
func (r *ReaderCloser) Close() error
type StyleOverwrites ¶
Click to show internal directories.
Click to hide internal directories.