Versions in this module Expand all Collapse all v0 v0.2.0 Nov 15, 2022 Changes in this version + func LimitReader(r io.Reader, n Size) *io.LimitedReader + type Progress struct + Err error + N Size + Total Size + func (p *Progress) Done() bool + type ProgressReader struct + R io.Reader + Update func(Progress) + UpdateAfter Size + UpdateEvery time.Duration + func NewProgressReader(r io.Reader, d time.Duration, update func(Progress)) *ProgressReader + func (r *ProgressReader) Progress() Progress + func (r *ProgressReader) Read(p []byte) (int, error) v0.1.0 Nov 2, 2022 Changes in this version + const Bit + const Byte + const GB + const GBit + const GiB + const KB + const KBit + const KiB + const MB + const MBit + const MiB + const PB + const PiB + const TB + const TBit + const TiB + func FormatBitSize(s BitSize, fmt byte, prec int) string + func FormatSize(s Size, fmt byte, prec int) string + type BitSize int64 + func ParseBitSize(s string) (BitSize, error) + func (b BitSize) Abs() BitSize + func (b BitSize) Bytes() (Size, BitSize) + func (b BitSize) Gigabits() float64 + func (b BitSize) Kilobits() float64 + func (b BitSize) Megabits() float64 + func (b BitSize) Round(m BitSize) BitSize + func (b BitSize) String() string + func (b BitSize) Terabits() float64 + func (b BitSize) Truncate(m BitSize) BitSize + type Size int64 + func ParseSize(s string) (Size, error) + func (s Size) Abs() Size + func (s Size) Bits() BitSize + func (s Size) Gibibytes() float64 + func (s Size) Gigabytes() float64 + func (s Size) Kibibytes() float64 + func (s Size) Kilobytes() float64 + func (s Size) Mebibytes() float64 + func (s Size) Megabytes() float64 + func (s Size) Pebibytes() float64 + func (s Size) Petabytes() float64 + func (s Size) Round(m Size) Size + func (s Size) String() string + func (s Size) Tebibytes() float64 + func (s Size) Terabytes() float64 + func (s Size) Truncate(m Size) Size