Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NumberFloat ¶
func NumberFloat(i interface{}) float64
NumberFloat is a helper function to convert an expected float that is returned from a json Unmarshal as a Number, into an actual float64 without returning any errors. If there is an error, it just returns 0. Use this when you absolutely know you are expecting a float. Can convert strings too.
func NumberInt ¶
func NumberInt(i interface{}) int
NumberInt is a helper function to convert an expected integer that is returned from a json Unmarshal as a Number, into an actual integer without returning any errors. If there is an error, it just returns 0. Use this when you absolutely know you are expecting an integer. Can convert strings too.
func NumberString ¶
func NumberString(i interface{}) string
NumberString is a helper function to convert a value that might get cast as a Json Number into a string. If there is an error, it just returns 0. Use this when you absolutely know you are expecting a string.
Types ¶
This section is empty.