units

package
Version: v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KB 1024.
	KB int64 = 1024
	// MB 1,048,576.
	MB int64 = KB * 1024
	// GB 1,073,741,824.
	GB int64 = MB * 1024
	// TB 1,099,511,627,776.
	TB int64 = GB * 1024
	// PB 1,125,899,906,842,624.
	PB int64 = TB * 1024
	// EB 1,152,921,504,606,847,000.
	EB int64 = PB * 1024
)

Functions

func Bits2Human

func Bits2Human(rawValue int64) string

Bits2Human converts bits to human readable version.

func KB2Human

func KB2Human(rawValue int64) string

KB2Human converts KBs to human readable version.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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