Documentation ¶
Overview ¶
Package format provides convenience functions for formatting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TimeFormatSeconds string = "02 Jan 2006 15:04:05 MST" TimeFormatSubseconds string = "02 Jan 2006 15:04:05.99 MST" )
Functions ¶
func Duration ¶
Duration is similar to the time.Duration.String method from the standard library but is more readable and shows only 3 digits of precision when duration is less than 1 minute.
func FormatBytes ¶
FormatBytes returns a string with the number of bytes specified converted into a human-friendly format with a binary multiplier (i.e. GiB).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.