Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IECSize ¶
type IECSize uint64
IECSize represents IEC (base-2) byte sizes (1 KiB = 2^10 bytes).
const ( Byte IECSize = 1 KiB IECSize = 1 << (iota * 10) // 2^10 = 1024 (Kibibyte) MiB // 2^20 = 1048576 (Mebibyte) GiB // 2^30 = 1073741824 (Gibibyte) TiB // 2^40 = 1099511627776 (Tebibyte) PiB // 2^50 = 1125899906842624 (Pebibyte) EiB // 2^60 = 1152921504606846976 (Exbibyte) )
IEC (base-2) byte size constants.
func (IECSize) MarshalSetting ¶
func (*IECSize) UnmarshalSetting ¶
type SISize ¶
type SISize uint64
SISize represents SI (base-10) byte sizes (1 KB = 10^3 bytes).
const ( ByteSI SISize = 1 KB SISize = 1000 * ByteSI // 10^3 = 1000 (Kilobyte) MB SISize = 1000 * KB // 10^6 = 1000000 (Megabyte) GB SISize = 1000 * MB // 10^9 = 1000000000 (Gigabyte) TB SISize = 1000 * GB // 10^12 = 1000000000000 (Terabyte) PB SISize = 1000 * TB // 10^15 = 1000000000000000 (Petabyte) EB SISize = 1000 * PB // 10^18 = 1000000000000000000 (Exabyte) )
SI (base-10) byte size constants.
func (SISize) MarshalSetting ¶
func (*SISize) UnmarshalSetting ¶
Click to show internal directories.
Click to hide internal directories.