Versions in this module Expand all Collapse all v1 v1.0.5 Aug 24, 2015 Changes in this version + const BinarySI + const DecimalExponent + const DecimalSI + var ErrFormatWrong = errors.New("quantities must match the regular expression '" + splitREString + "'") + var ErrNumeric = errors.New("unable to parse numeric part of quantity") + var ErrSuffix = errors.New("unable to parse quantity's suffix") + var MaxMilliValue = int64(((1 << 63) - 1) / 1000) + func NewQuantityFlagValue(q *Quantity) flag.Value + type Format string + type Quantity struct + Amount *inf.Dec + func MustParse(str string) Quantity + func NewMilliQuantity(value int64, format Format) *Quantity + func NewQuantity(value int64, format Format) *Quantity + func ParseQuantity(str string) (*Quantity, error) + func QuantityFlag(flagName, defaultValue, description string) *Quantity + func (q *Quantity) Add(y Quantity) error + func (q *Quantity) Canonicalize() (string, suffix) + func (q *Quantity) Copy() *Quantity + func (q *Quantity) MilliValue() int64 + func (q *Quantity) Set(value int64) + func (q *Quantity) SetMilli(value int64) + func (q *Quantity) String() string + func (q *Quantity) UnmarshalJSON(value []byte) error + func (q *Quantity) Value() int64 + func (q Quantity) MarshalJSON() ([]byte, error)