common

package
v0.0.0-...-dccb53c Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ByteUnits is a k=>v map of units for conversion
	ByteUnits = map[int]string{
		0: "B",
		1: "kB",
		2: "MB",
		3: "GB",
		4: "TB",
	}
)

Functions

func ConvertBytes

func ConvertBytes(in uint64) (float64, string, error)

ConvertBytes converts bytes to the highest possible unit

func ConvertBytesTo

func ConvertBytesTo(in uint64, maxUnit string) (float64, string, error)

ConvertBytesTo converts bytes to the specified unit

func ConvertNetmask

func ConvertNetmask(in uint8) (string, error)

ConvertNetmask converts CIDR (netmask) to Netmask

func GetHostEtc

func GetHostEtc() string

func GetHostProc

func GetHostProc() string

func GetHostSys

func GetHostSys() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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