Documentation ¶
Overview ¶
Package bytecount provides a single datatype ByteCount, designed to track counts of bytes, as well as some helper constants. It also provides all the necessary functions to allow a ByteCount to be specified as a command-line argument, which should allow command-line arguments like `--cache-size=20MB`.
Index ¶
Constants ¶
View Source
const ( Byte ByteCount = 1 Kilobyte = 1000 * Byte Megabyte = 1000 * Kilobyte Gigabyte = 1000 * Megabyte )
Some constants to make working with ByteCounts easier. If the difference between Kilobytes and Kibibytes matters to you, then this package is likely too unsophisticated for your needs. Pull requests are welcome, however.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteCount ¶
type ByteCount int64
ByteCount holds filesizes and the like.
func (ByteCount) Get ¶
func (b ByteCount) Get() interface{}
Get is used by the Flag package to get the value out of the ByteCount.
Click to show internal directories.
Click to hide internal directories.