Documentation ¶
Overview ¶
Package humansize - Human-readable data sizes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Size ¶
type Size uint64
Size allows us to give users the option to use suffixes like g and K. It is also suitable for passing to flag.TextVar.
func MustNew ¶
MustNew retruns a new Size into which is unmarshalled s. If Unmarshalling fails, MustNew panics.
func (*Size) MarshalText ¶
MarshalText implements encoding.TextMarshaler. It is just s.String with extra steps.
func (Size) String ¶
String implements fmt.Stringer and is more or less the inverse of UnmarshalText.
func (*Size) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler. A nil or empty slices unmarshals to 0.
Click to show internal directories.
Click to hide internal directories.