Documentation
¶
Index ¶
Constants ¶
View Source
const ( ByteUnit = "b" KilobyteUnit = "kb" MegabyteUnit = "mb" GigabyteUnit = "gb" TerabyteUnit = "tb" PetabyteUnit = "pb" ExabyteUnit = "eb" )
View Source
const ( Byte = 1 Kilobyte = 1024 Megabyte = 1024 * 1024 Gigabyte = 1024 * 1024 * 1024 Terabyte = 1024 * 1024 * 1024 * 1024 Petabyte = 1024 * 1024 * 1024 * 1024 * 1024 Exabyte = 1024 * 1024 * 1024 * 1024 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByteSize ¶
type ByteSize int64
func FromString ¶
ToBytes parses a string formatted by ByteSize as bytes. Note, this is based on the basis of 2 (no KiB, ...).
func (ByteSize) MarshalYAML ¶
func (*ByteSize) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.