units

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2016 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
const BinaryConvertThreshold = 1024

BinaryConvertThreshold is the number for a binary "step"

Variables

View Source
var BinarySuffixPrefixes = map[float64]string{
	1125899906842624: "%.2f PB",
	1099511627776:    "%.2f TB",
	1073741824:       "%.2f GB",
	1048576:          "%.2f MB",
	1024:             "%.1f kB",
	0:                "%.0f bytes",
}

BinarySuffixPrefixes are the floats with the specific binary suffix string fmt.

Functions

func BinarySuffix

func BinarySuffix(number float64) string

BinarySuffix returns the given number with a binary suffix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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