Documentation ¶
Index ¶
Constants ¶
View Source
const ( KiB = 1024 MiB = 1048576 GiB = 1073741824 TiB = 1099511627776 KB = 1e3 MB = 1e6 GB = 1e9 TB = 1e12 )
Variables ¶
View Source
var DefaultFormat = ProgressFormat{ BoxStart: "[", BoxEnd: "]", Empty: " ", Current: ">", Completed: "=", Spin: []rune{'\\', '|', '/', '-'}, }
Functions ¶
Types ¶
type ProgressFormat ¶
type ProgressFormat struct { BoxStart string BoxEnd string Empty string Current string Completed string Spin []rune }
func (*ProgressFormat) String ¶
func (pf *ProgressFormat) String() string
type Units ¶
type Units int
const ( // U_NO are default units, they represent a simple value and are not formatted at all. U_NO Units = iota // U_BYTES units are formatted in a human readable way (B, KiB, MiB, ...) U_BYTES // U_BYTES_DEC units are like U_BYTES, but base 10 (B, KB, MB, ...) U_BYTES_DEC // U_DURATION units are formatted in a human readable way (3h14m15s) U_DURATION )
Click to show internal directories.
Click to hide internal directories.