Documentation ¶
Index ¶
Constants ¶
View Source
const ( Invalid Unit = iota Byte Kilobyte Megabyte Gigabyte Terabyte Petabyte Exabyte Kibibyte = iota + gap - Exabyte + 1 Mebibyte Gibibyte Tebibyte Pebibyte Exbibyte )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSize ¶
type DataSize struct {
// contains filtered or unexported fields
}
func (DataSize) Add ¶ added in v0.6.0
Add sums two numbers together, converting to the highest unit with a magnitude above 1. The result will be in the unit system (SI or std) of d.
func (DataSize) ToHumanReadable ¶
func (DataSize) ToHumanReadableSi ¶ added in v0.6.0
type Unit ¶
type Unit int
func UnitFromString ¶ added in v0.5.0
func (Unit) ShortString ¶
Click to show internal directories.
Click to hide internal directories.