utils

package
v0.0.0-...-65d76af Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: AGPL-3.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KB = uint64(math.Pow(2, 10))
	MB = uint64(math.Pow(2, 20))
	GB = uint64(math.Pow(2, 30))
	TB = uint64(math.Pow(2, 40))
)

Functions

func BytesToGB

func BytesToGB(b uint64) float64

func BytesToKB

func BytesToKB(b uint64) float64

func BytesToMB

func BytesToMB(b uint64) float64

func BytesToTB

func BytesToTB(b uint64) float64

func CelsiusToFahrenheit

func CelsiusToFahrenheit(c int) int

func ConvertBytes

func ConvertBytes(b uint64) (float64, string)

func ConvertLocalizedString

func ConvertLocalizedString(s string) string

func GetConfigDir

func GetConfigDir(name string) string

func GetLogDir

func GetLogDir(name string) string

func MaxInt

func MaxInt(a, b int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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