units

package
v9.4.11+incompatible Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 5 Imported by: 18

Documentation

Index

Constants

View Source
const (

	// KiB 1024 bytes
	KiB = 1 << (10 * iota)
	// MiB 1024 KiB
	MiB
	// GiB 1024 MiB
	GiB
	// TiB 1024 GiB
	TiB
	// PiB 1024 TiB
	PiB
)
View Source
const (
	// KB 1000 bytes
	KB = 1000
	// MB 1000 KB
	MB = KB * 1000
	// GB 1000 MB
	GB = MB * 1000
	// TB 1000 GB
	TB = GB * 1000
	// PB 1000 TB
	PB = TB * 1000
)

Variables

View Source
var BadUnit = errors.New("Bad unit")

Functions

func Parse

func Parse(bUnit string) (int64, error)

func String

func String(b uint64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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