Documentation ¶
Index ¶
- func DaysIn(year int, month time.Month) int
- func Elapsed(from, to time.Time) (inverted bool, years, months, days, hours, minutes, seconds, nanoseconds int)
- func HumanReadableBandwidth(bytes uint64, delta time.Duration, ext string) string
- func HumanReadableDate(duration time.Duration, options ...string) string
- func HumanReadableFreq(value interface{}, hideUnit ...bool) string
- func HumanReadableSize(size interface{}, opt ...HROptions) string
- func HumanReadableSizeAlt(b int64, options ...HROptions) string
- func HumanReadableTime(duration time.Duration, unitSep ...string) string
- type HROptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HumanReadableBandwidth ¶
humanReadableTime: Convert bytes value to unit/sec string using 'delta' to specify the time interval. 'ext' could be 'iB' -> "KiB/s" or B -> "KB/s"
func HumanReadableDate ¶
TODO humanReadableDate: Convert time.Duration to string human readable version.
func HumanReadableFreq ¶
String: Convert frenquency value int64 to string human readable version.
func HumanReadableSize ¶
humanReadableSize: Convert file size (octets/bytes) to human readable version. Note: 'options' in order means => 'useDecimal', 'hideUnit'. 'useDecimal' argument define kilo = 1000 instead of 1024.
func HumanReadableSizeAlt ¶
HumanReadableSizeAlt: Same as above with an alternative method. Format byte size to human readable format.
Types ¶
Click to show internal directories.
Click to hide internal directories.