Documentation
¶
Index ¶
- Variables
- func Human(n uint64, prefixes []Prefix, unit string) (string, string)
- type Count32
- func (n1 *Count32) AdjustMaxIfNecessary(n2 Count32) bool
- func (n1 *Count32) AdjustMaxIfPossible(n2 Count32) bool
- func (n Count32) Human(prefixes []Prefix, unit string) (string, string)
- func (n1 *Count32) Increment(n2 Count32)
- func (n1 Count32) Plus(n2 Count32) Count32
- func (n Count32) ToUint64() uint64
- type Count64
- func (n1 *Count64) AdjustMaxIfNecessary(n2 Count64) bool
- func (n1 *Count64) AdjustMaxIfPossible(n2 Count64) bool
- func (n Count64) Human(prefixes []Prefix, unit string) (string, string)
- func (n1 *Count64) Increment(n2 Count64)
- func (n1 Count64) Plus(n2 Count64) Count64
- func (n Count64) ToUint64() uint64
- type Humaner
- type Prefix
Constants ¶
This section is empty.
Variables ¶
View Source
var BinaryPrefixes []Prefix
View Source
var MetricPrefixes []Prefix
Functions ¶
Types ¶
type Count32 ¶
type Count32 uint32
A count of something, capped at math.MaxUint32.
func NewCount32 ¶
func (*Count32) AdjustMaxIfNecessary ¶
AdjustMaxIfNecessary adjusts `*n1` to be `max(*n1, n2)`. Return true iff `n2` was greater than `*n1`.
func (*Count32) AdjustMaxIfPossible ¶
AdjustMaxIfPossible adjusts `*n1` to be `max(*n1, n2)`. Return true iff `n2` was greater than or equal to `*n1`.
type Count64 ¶
type Count64 uint64
A count of something, capped at math.MaxUint64.
func NewCount64 ¶
func (*Count64) AdjustMaxIfNecessary ¶
AdjustMaxIfNecessary adjusts `*n1` to be `max(*n1, n2)`. Return true iff `n2` was greater than `*n1`.
func (*Count64) AdjustMaxIfPossible ¶
AdjustMaxIfPossible adjusts `*n1` to be `max(*n1, n2)`. Return true iff `n2` was greater than or equal to `*n1`.
Click to show internal directories.
Click to hide internal directories.