Documentation
¶
Index ¶
Constants ¶
View Source
const ( BYTE = 1 << (10 * iota) KILOBYTE MEGABYTE GIGABYTE TERABYTE PETABYTE EXABYTE )
Variables ¶
This section is empty.
Functions ¶
func HumanizeBytes ¶ added in v1.5.2
ByteSize returns a human-readable byte string of the form 10M, 12.5K, and so forth. The following units are available:
E: Exabyte P: Petabyte T: Terabyte G: Gigabyte M: Megabyte K: Kilobyte B: Byte
The unit that results in the smallest number greater than or equal to 1 is always chosen.
func HumanizeDuration ¶ added in v1.5.2
HumanizeDuration formats a time duration to human readable format The duration in floored to the nearest unit. so 75 seconds becomes 1 minute biggest unit is days (no weeks, months or years )
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.