Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DigitRegex = regexp.MustCompile(`\d+`)
View Source
var ErrInvalidByteSizeString = fmt.Errorf("Invalid byte size string")
Functions ¶
func FormatBytes ¶
func FormatBytesHighPrecision ¶
Like FormatBytes, but with 3 decimal places of precision
func ParseBytes ¶
We support suffixes 'mb', 'kb', 'gb', etc. We also support suffixes of just the letter, eg 'm', 'g', etc. Examples: 123 m -> 123*1024*1024 123 mb -> 123*1024*1024 123 GB -> 123*1024*1024*1024 123 T -> 123*1024*1024*1024*1024 123 P -> 123*1024*1024*1024*1024*1024
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.