Documentation
¶
Index ¶
Constants ¶
View Source
const ( // B byte (Unit) B BytesUnit = 1 // KB Kilobyte (SI) - 1000 bytes KB BytesUnit = 1000 // MB Megabyte (SI) - 1e6 bytes MB BytesUnit = 1e6 // GB Gigabyte (SI) - 1e9 bytes GB BytesUnit = 1e9 // TB Terabyte (SI) - 1e12 bytes TB BytesUnit = 1e12 // PB Petabyte (SI) - 1e15 bytes PB BytesUnit = 1e15 // KiB Kibibyte (NIST) - 1024 bytes KiB BytesUnit = 1024 // MiB Mebibyte (NIST) - 2^20 bytes MiB = 1024 * KiB // GiB Gibibyte (NIST) - 2^30 bytes GiB = 1024 * MiB // TiB Tebibyte (NIST) - 2^40 bytes TiB = 1024 * GiB // PiB Pebibyte (NIST) - 2^50 bytes PiB = 1024 * TiB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bytes ¶
type Bytes int64
Bytes is a formattable byte count
func ParseBytes ¶
ParseBytes parses the given string with byte units into a Byte count
Click to show internal directories.
Click to hide internal directories.