bytesize

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

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

func Parse(str string) (ByteSize, error)

func (ByteSize) Bytes

func (b ByteSize) Bytes() int

func (*ByteSize) Set

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