convert

package
v0.0.0-...-1ca2487 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(condition bool) *bool

BoolPtr takes in boolen condition and returns pointer version of it

func FloatFromString

func FloatFromString(raw interface{}) (float64, error)

FloatFromString format

func Int64FromString

func Int64FromString(raw interface{}) (int64, error)

Int64FromString format

func IntFromString

func IntFromString(raw interface{}) (int, error)

IntFromString format

func RecvWindow

func RecvWindow(d time.Duration) int64

RecvWindow converts a supplied time.Duration to milliseconds

func SplitFloatDecimals

func SplitFloatDecimals(input float64) (baseNum, decimalNum int64, err error)

SplitFloatDecimals takes in a float64 and splits the decimals into their own integers Warning. Passing in numbers with many decimals can lead to a loss of accuracy

func TimeFromUnixTimestampFloat

func TimeFromUnixTimestampFloat(raw interface{}) (time.Time, error)

TimeFromUnixTimestampFloat format

func UnixMillis

func UnixMillis(t time.Time) int64

UnixMillis converts a UnixNano timestamp to milliseconds

func UnixTimestampStrToTime

func UnixTimestampStrToTime(timeStr string) (time.Time, error)

UnixTimestampStrToTime returns a time.time and an error

func UnixTimestampToTime

func UnixTimestampToTime(timeint64 int64) time.Time

UnixTimestampToTime returns time.time

Types

This section is empty.

Jump to

Keyboard shortcuts

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