Documentation
¶
Overview ¶
Package size define common size units
Index ¶
Constants ¶
View Source
const ( B = 1 KB = multiplication.Kilo * B MB = multiplication.Mega * B GB = multiplication.Giga * B TB = multiplication.Tera * B PB = multiplication.Peta * B EB = multiplication.Exa * B ZB = multiplication.Zeta * B YB = multiplication.Yotta * B KiB = float64(1 << 10) MiB = float64(1 << 20) GiB = float64(1 << 30) TiB = float64(1 << 40) PiB = float64(1 << 50) EiB = float64(1 << 60) ZiB = float64(1 << 70) YiB = float64(1 << 80) )
Variables ¶
Functions ¶
func FormatSizeAsBinarySI ¶ added in v1.93.0
FormatSizeAsBinarySI formats a size into a binary SI string (https://en.wikipedia.org/wiki/Binary_prefix) scale corresponds to the number of decimal places. For no limits, set to a negative number
func FormatSizeAsDecimalSI ¶ added in v1.93.0
FormatSizeAsDecimalSI formats a size into a decimal SI string (https://en.wikipedia.org/wiki/Binary_prefix) scale corresponds to the number of decimal places. For no limits, set to a negative number
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.