Documentation ¶
Overview ¶
Package datasize provides a data size type and constants.
Index ¶
- Constants
- Variables
- type Size
- func (b Size) Bytes() uint64
- func (b Size) EBytes() float64
- func (b Size) GBytes() float64
- func (b Size) KBytes() float64
- func (b Size) MBytes() float64
- func (b Size) MachineString() string
- func (b Size) MarshalText() ([]byte, error)
- func (b Size) PBytes() float64
- func (b Size) String() string
- func (b Size) TBytes() float64
- func (b *Size) UnmarshalText(t []byte) error
Constants ¶
Variables ¶
View Source
var ErrBits = errors.New("unit with capital unit prefix and lower case unit (b) - bits, not bytes")
Functions ¶
This section is empty.
Types ¶
type Size ¶
type Size uint64
Size represents a data size.
func MustParseString ¶
func ParseString ¶
func (Size) MachineString ¶
MachineString returns a machine-friendly representation of the data size.
func (Size) MarshalText ¶
func (*Size) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.