import "github.com/docker/docker/vendor/github.com/docker/go-units"
Package units provides helper function to parse and print size and time units in human-readable format.
const ( KB = 1000 MB = 1000 * KB GB = 1000 * MB TB = 1000 * GB PB = 1000 * TB KiB = 1024 MiB = 1024 * KiB GiB = 1024 * MiB TiB = 1024 * GiB PiB = 1024 * TiB )
See: http://en.wikipedia.org/wiki/Binary_prefix
BytesSize returns a human-readable size in bytes, kibibytes, mebibytes, gibibytes, or tebibytes (eg. "44kiB", "17MiB").
CustomSize returns a human-readable approximation of a size using custom format.
FromHumanSize returns an integer from a human-readable specification of a size using SI standard (eg. "44kB", "17MB").
HumanDuration returns a human-readable approximation of a duration (eg. "About a minute", "4 hours ago", etc.).
HumanSize returns a human-readable approximation of a size capped at 4 valid numbers (eg. "2.746 MB", "796 KB").
HumanSizeWithPrecision allows the size to be in any precision, instead of 4 digit precision used in units.HumanSize.
RAMInBytes parses a human-readable string representing an amount of RAM in bytes, kibibytes, mebibytes, gibibytes, or tebibytes and returns the number of bytes, or -1 if the string is unparseable. Units are case-insensitive, and the 'b' suffix is optional.
type Rlimit struct { Type int `json:"type,omitempty"` Hard uint64 `json:"hard,omitempty"` Soft uint64 `json:"soft,omitempty"` }
Rlimit specifies the resource limits, such as max open files.
Ulimit is a human friendly version of Rlimit.
ParseUlimit parses and returns a Ulimit from the specified string.
GetRlimit returns the RLimit corresponding to Ulimit.
Package units imports 5 packages (graph). Updated 2019-05-16. Refresh now. Tools for package owners.