Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoerceNumber ¶
CoerceNumber converts any numeric value into the requested target type T.
Types ¶
type ByteSize ¶
type ByteSize int64
ByteSize represents a quantity of bytes that can be unmarshaled from text.
const ( B ByteSize = 1 KB ByteSize = 1000 * B KiB ByteSize = 1024 * B MB ByteSize = 1000 * KB MiB ByteSize = 1024 * KiB GB ByteSize = 1000 * MB GiB ByteSize = 1024 * MiB TB ByteSize = 1000 * GB TiB ByteSize = 1024 * GiB )
ByteSize constants represent byte sizes.
func ParseByteSize ¶
ParseByteSize parses human-readable byte strings into a ByteSize.
func (ByteSize) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*ByteSize) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
type Duration ¶
Duration wraps a time.Duration with universal text deserialization.
func (Duration) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*Duration) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
Click to show internal directories.
Click to hide internal directories.