Documentation ¶
Index ¶
- func Equal(v1, v2 interface{}) bool
- func Float64Equal(f1, f2 float64, dec ...uint) bool
- func RoundFloat64Dec(f float64, dec uint) float64
- func SliceContains(sl []string, s string) bool
- func ToBool(vals ...interface{}) bool
- func ToDuration(vars ...interface{}) time.Duration
- func ToFloat32(vals ...interface{}) float32
- func ToFloat64(vals ...interface{}) float64
- func ToInt(vals ...interface{}) int
- func ToInt16(vals ...interface{}) int16
- func ToInt32(vals ...interface{}) int32
- func ToInt64(vals ...interface{}) int64
- func ToInt8(vals ...interface{}) int8
- func ToString(vars ...interface{}) string
- func ToUInt(vals ...interface{}) uint
- func ToUInt16(vals ...interface{}) uint16
- func ToUInt32(vals ...interface{}) uint32
- func ToUInt64(vals ...interface{}) uint64
- func ToUInt8(vals ...interface{}) uint8
- func TypeSupported(in interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
func Equal(v1, v2 interface{}) bool
Equal returns true if the parameters contain equal values
func Float64Equal ¶
Float64Equal returns true if the floating point values are equal up to including the given number of decimals if no decimals are supplied the function will compare up to including the 6th decimal
func RoundFloat64Dec ¶
RoundFloat64Dec rounds the parameter on the given number of decimals
func SliceContains ¶
SliceContains returns true if the slice of strings contains the given string
func ToBool ¶
func ToBool(vals ...interface{}) bool
ToBool converts the first convertible parameter to a boolean nil, empty strings and strings containing a pipe symbol are skipped
func ToDuration ¶
ToDuration converts the first convertible parameter to a time.Duration nil, non-parsable strings and unsupported types are skipped
func ToFloat32 ¶
func ToFloat32(vals ...interface{}) float32
ToFloat32 converts the first convertible parameter to a float32 nil and non-parsable strings are skipped
func ToFloat64 ¶
func ToFloat64(vals ...interface{}) float64
ToFloat64 converts the first convertible parameter to a float64 nil and non-parsable strings are skipped
func ToInt ¶
func ToInt(vals ...interface{}) int
ToInt converts the first convertible parameter to an int nil and non-parsable strings are skipped
func ToInt16 ¶
func ToInt16(vals ...interface{}) int16
ToInt16 converts the first convertible parameter to an int16 nil and non-parsable strings are skipped
func ToInt32 ¶
func ToInt32(vals ...interface{}) int32
ToInt32 converts the first convertible parameter to an int32 nil and non-parsable strings are skipped
func ToInt64 ¶
func ToInt64(vals ...interface{}) int64
ToInt64 converts the first convertible parameter to an int64 nil and non-parsable strings are skipped
func ToInt8 ¶
func ToInt8(vals ...interface{}) int8
ToInt8 converts the first convertible parameter to an int8 nil and non-parsable strings are skipped
func ToString ¶
func ToString(vars ...interface{}) string
ToString converts the first convertible parameter to a string nil and unsupported types are skipped
func ToUInt ¶
func ToUInt(vals ...interface{}) uint
ToUInt converts the first convertible parameter to an uint nil and non-parsable strings are skipped
func ToUInt16 ¶
func ToUInt16(vals ...interface{}) uint16
ToUInt16 converts the first convertible parameter to an uint16 nil and non-parsable strings are skipped
func ToUInt32 ¶
func ToUInt32(vals ...interface{}) uint32
ToUInt32 converts the first convertible parameter to an uint32 nil and non-parsable strings are skipped
func ToUInt64 ¶
func ToUInt64(vals ...interface{}) uint64
ToUInt64 converts the first convertible parameter to a uint64 nil and non-parsable strings are skipped
func ToUInt8 ¶
func ToUInt8(vals ...interface{}) uint8
ToUInt8 converts the first convertible parameter to an uint8 nil and non-parsable strings are skipped
func TypeSupported ¶
func TypeSupported(in interface{}) bool
TypeSupported returns true if the given parameter is a supported variant type
Types ¶
This section is empty.