Documentation ¶
Index ¶
- func Assert(tb testing.TB, condition bool, msg string, v ...interface{})
- func Equals(tb testing.TB, exp, act interface{})
- func ErrorMsg(id string)
- func GetDateFromUnix(createTime int64) string
- func GetInMB(bytes uint64, precision int) float64
- func Raises(tb testing.TB, err error)
- func RoundFloat(num float64, base string, precision int) float64
- func RoundUint(num uint64, base string, precision int) float64
- func RoundValues(num1, num2 float64, inBytes bool) ([]float64, string)
- func SecondsToHuman(input int) (result string)
- func SortData(data [][]string, sortIdx int, sortAsc bool, sortCase string)
- func TickUntilDone(ctx context.Context, refreshRate uint64, action func() error) (err error)
- func Trim(num float64, precision int) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDateFromUnix ¶
GetDateFromUnix gets a date and time in RFC822 format from a unix epoch in millisecond
func RoundFloat ¶
RoundFloat rounds off a float to a given base and precision
func RoundValues ¶
RoundValues rounds off values to nearest K, G, M, etc. Returns the rounded values and the unit. If inBytes is set to true, units are returned as B, kB, gB, etc.
func SecondsToHuman ¶
SecondsToHuman converts a given UNIX epoch in seconds to human readble format
func SortData ¶
SortData helps sort table rows. It sorts the table based on values given in the sortIdx column and sorts ascending if sortAsc is true. sortCase is set to identify the set of 'less' functions to use to sort the selected column by.
func TickUntilDone ¶
TickUntilDone runs a given action at a tick rate specified by refreshRate, it returns if the context is cancelled
Types ¶
This section is empty.