Documentation
¶
Overview ¶
Package bytes helps to represent human-readable size values in JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bytes ¶
type Bytes struct {
// Value is the number of bytes.
Value uint64
}
Bytes helps to represent human-readable size values in JSON.
func (Bytes) MarshalJSON ¶
MarshalJSON renders bytes as a human-readable JSON string (for example, "20M").
func (*Bytes) UnmarshalJSON ¶
UnmarshalJSON parses a JSON string like "512M" into bytes.
Click to show internal directories.
Click to hide internal directories.