bytesize

package
Version: v0.0.0-...-de1ad02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	KB
	MB
	GB
	TB
	PB
)

Variables

View Source
var (
	ErrBadByteSize     = errors.New("invalid bytesize")
	ErrBadByteSizeUnit = errors.New("invalid bytesize unit")
)

Functions

func MustParse

func MustParse(s string) int64

func Parse

func Parse(s string) (int64, error)

Types

type Int64

type Int64 int64

func (Int64) AsInt

func (b Int64) AsInt() int

func (Int64) HumanString

func (b Int64) HumanString() string

func (Int64) Int64

func (b Int64) Int64() int64

func (Int64) MarshalText

func (b Int64) MarshalText() ([]byte, error)

func (*Int64) UnmarshalText

func (p *Int64) UnmarshalText(text []byte) error

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL