utils

package
v3.5.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

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

func TruncateFront

func TruncateFront(s string, w int, prefix string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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