utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHumanReadableUpTime

func GetHumanReadableUpTime(upTime time.Duration) string

transforms the given up time into a human readable string.

func MaxDuration

func MaxDuration(x, y time.Duration) time.Duration

max duration returns the larger of x or y.

func MaxFloat added in v0.2.2

func MaxFloat(floatMap map[string]*big.Float) (*big.Float, []string)

scans the map with the corresponding float value, and then returns the maximum float value in the map as well as a list map keys that have the maximum float value.

func MaxInt

func MaxInt(intValMap map[string]*big.Int) (*big.Int, []string)

scans the map with the corresponding int value, and then returns the maximum int value in the map as well as a list map keys that have the maximum int value.

func MinDuration

func MinDuration(x, y time.Duration) time.Duration

min duration returns the smaller of x or y.

func MinFloat

func MinFloat(floatMap map[string]*big.Float) (*big.Float, []string)

scans the map with the corresponding float value, and then returns the minimum float value in the map as well as a list map keys that have the minimum float value.

func MinInt added in v0.2.2

func MinInt(intValMap map[string]*big.Int) (*big.Int, []string)

scans the map with the corresponding int value, and then returns the minimum int value in the map as well as a list map keys that have the minimum int value.

func MinMaxNormFloat added in v0.2.2

func MinMaxNormFloat(floatMap map[string]*big.Float) map[string]*big.Float

Types

This section is empty.

Jump to

Keyboard shortcuts

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