Documentation
¶
Index ¶
Constants ¶
View Source
const (
YYMMDD = "2006/01/02 15:04:05"
)
Define constant YYMMDD as the date format used in the function
Variables ¶
This section is empty.
Functions ¶
func InterfaceToFloat64 ¶
func InterfaceToFloat64(val interface{}) float64
InterfaceToFloat64 will convert any interface value to float64
func Retry ¶
func Retry(ctx context.Context, n int, interval time.Duration, done chan<- bool, f RetryFunc, onSucceed RetryCallbackFunc, onError RetryCallbackFunc)
Retry is a wrapper function that is used to try to call external resources that have the potential to fail
func TimeDifference ¶
TimeDifference calculates the difference in minutes between two timestamps timeFrom and timeNow, passed as strings in the format defined in YYMMDD The function returns a string with the difference in minutes
Types ¶
type RetryCallbackFunc ¶
type RetryCallbackFunc func()
RetryCallbackFunc is a function type for callback
Click to show internal directories.
Click to hide internal directories.