bytesize

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KB = 1024 * Byte
	MB = 1024 * KB
	GB = 1024 * MB
	TB = 1024 * GB
	PB = 1024 * TB
)
View Source
var (
	KiB = 1000 * Byte
	MiB = 1000 * KiB
	GiB = 1000 * MiB
	TiB = 1000 * GiB
	PiB = 1000 * TiB
)

Functions

This section is empty.

Types

type ByteSize

type ByteSize int64
var Byte ByteSize = 1

func Parse added in v0.0.31

func Parse(str string) (ByteSize, error)

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