Documentation ¶
Index ¶
- Constants
- type Volume
- func (v *Volume) BiggerThan(v2 Volume) bool
- func (v Volume) Bits() float64
- func (v Volume) Bytes() uint64
- func (v *Volume) Equals(v2 Volume) bool
- func (v Volume) MBytes() float64
- func (v Volume) MarshalJSON() ([]byte, error)
- func (v *Volume) SmallerThan(v2 Volume) bool
- func (v Volume) String() string
- func (v *Volume) UnmarshalJSON(b []byte) error
Constants ¶
View Source
const ( KB Volume = Volume(gspeed.KB) MB = Volume(gspeed.MB) GB = Volume(gspeed.GB) TB = Volume(gspeed.TB) PB = Volume(gspeed.PB) EB = Volume(gspeed.EB) ZB = Volume(gspeed.ZB) YB = Volume(gspeed.YB) )
Map between speed unit of byte and bits size
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Volume ¶
func FromByteSize ¶
func ParseString ¶
volume string sample: "2M" "2MB" "2Mbyte" "2Mbytes"
func (*Volume) BiggerThan ¶
func (Volume) MarshalJSON ¶
func (*Volume) SmallerThan ¶
func (*Volume) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.