Documentation ¶
Index ¶
Constants ¶
View Source
const ( B = 1 << (10 * iota) KB MB GB TB PB EB )
Bytes unit convert
Variables ¶
View Source
var ( // ErrStringByteSizeInvalid is string of byte size invalid error ErrStringByteSizeInvalid = errors.New("xhuman: string of byte size is invalid") )
Functions ¶
func FormatByteSize ¶
FormatByteSize returns human string of byte size
func ParseByteSize ¶
ParseByteSize returns int size of string size
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.