Documentation ¶
Index ¶
- func BoolPtr(condition bool) *bool
- func FloatFromString(raw interface{}) (float64, error)
- func Int64FromString(raw interface{}) (int64, error)
- func IntFromString(raw interface{}) (int, error)
- func RoundDuration(d time.Duration, digits int) time.Duration
- func TimeFromUnixTimestampDecimal(input float64) time.Time
- func TimeFromUnixTimestampFloat(raw interface{}) (time.Time, error)
- func UnixTimestampStrToTime(timeStr string) (time.Time, error)
- func UnixTimestampToTime(timeint64 int64) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FloatFromString ¶
FloatFromString converts a string to a float64. Will return error if unable to convert.
func Int64FromString ¶
Int64FromString converts a string to an int64. Will return error if unable to convert.
func IntFromString ¶
IntFromString converts a string to an int. Will return error if unable to convert.
func RoundDuration ¶
RoundDuration takes in a time.Duration, and rounds to the wanted digits
func TimeFromUnixTimestampDecimal ¶
TimeFromUnixTimestampDecimal converts a unix timestamp in decimal form to a time.Time struct.
func TimeFromUnixTimestampFloat ¶
TimeFromUnixTimestampFloat converts a unix timestamp in float form to // a time.Time struct. Will return error if unable to convert.
func UnixTimestampStrToTime ¶
UnixTimestampStrToTime converts a unix timestamp in str format to a time.Timestruct. Will return error if unable to convert.
func UnixTimestampToTime ¶
UnixTimestampToTime converts a unix timestamp to a time.Time struct.
Types ¶
This section is empty.