bytesize

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	KB = 1024 * Byte
	MB = 1024 * KB
	GB = 1024 * MB
	TB = 1024 * GB
	PB = 1024 * TB

	KiB = 1000 * Byte
	MiB = 1000 * KiB
	GiB = 1000 * MiB
	TiB = 1000 * GiB
	PiB = 1000 * TiB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteSize

type ByteSize int64
const Byte ByteSize = 1

func Parse added in v0.0.31

func Parse(str string) (ByteSize, error)

func (ByteSize) Bytes added in v0.2.5

func (b ByteSize) Bytes() int

func (*ByteSize) Set added in v0.0.31

func (b *ByteSize) Set(value string) error

func (ByteSize) String

func (b ByteSize) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL