Documentation ¶
Index ¶
- Constants
- func ParseDatasize(str string) (float32, error)
- type Datasize
- func (b Datasize) Bits() float64
- func (b Datasize) Bytes() float64
- func (b Datasize) Exabytes() float64
- func (b Datasize) Gigabytes() float64
- func (b Datasize) Kilobytes() float64
- func (b Datasize) MarshalText() ([]byte, error)
- func (b Datasize) Megabytes() float64
- func (b Datasize) Petabytes() float64
- func (b Datasize) String() string
- func (b Datasize) Terabytes() float64
- func (b *Datasize) UnmarshalText(text []byte) error
Constants ¶
View Source
const ( // base 10 (SI prefixes) Bit Datasize = 1e0 Byte = Bit * 8 Kilobyte = Byte * 1e3 Megabyte = Byte * 1e6 Gigabyte = Byte * 1e9 Terabyte = Byte * 1e12 Petabyte = Byte * 1e15 Exabyte = Byte * 1e18 )
...
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datasize ¶
type Datasize float32
Datasize represents a unit of data size (in bits, bit)
func (Datasize) MarshalText ¶
MarshalText implements encoding.TextMarshaler
func (*Datasize) UnmarshalText ¶
UnmarshalText unmashal data
Click to show internal directories.
Click to hide internal directories.