Documentation ¶
Index ¶
- func Bool(in string) bool
- func Has(in interface{}, key interface{}) bool
- func Join(in interface{}, sep string) string
- func MustAtoi(s string) int
- func MustParseFloat(s string, bitSize int) float64
- func MustParseInt(s string, base, bitSize int) int64
- func MustParseUint(s string, base, bitSize int) uint64
- func Slice(args ...interface{}) []interface{}
- func ToBool(in interface{}) bool
- func ToBools(in ...interface{}) []bool
- func ToFloat64(v interface{}) float64
- func ToFloat64s(in ...interface{}) []float64
- func ToInt(in interface{}) int
- func ToInt64(v interface{}) int64
- func ToInt64s(in ...interface{}) []int64
- func ToInts(in ...interface{}) []int
- func ToString(in interface{}) string
- func ToStrings(in ...interface{}) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool converts a string to a boolean value, using strconv.ParseBool under the covers. Possible true values are: 1, t, T, TRUE, true, True All other values are considered false.
See ToBool also for a more flexible version.
func Has ¶
func Has(in interface{}, key interface{}) bool
Has determines whether or not a given object has a property with the given key
func Join ¶
Join concatenates the elements of a to create a single string. The separator string sep is placed between elements in the resulting string.
This is functionally identical to strings.Join, except that each element is coerced to a string first
func MustParseFloat ¶
MustParseFloat - wrapper for strconv.ParseFloat that returns 0 in the case of error
func MustParseInt ¶
MustParseInt - wrapper for strconv.ParseInt that returns 0 in the case of error
func MustParseUint ¶
MustParseUint - wrapper for strconv.ParseUint that returns 0 in the case of error
func Slice ¶
func Slice(args ...interface{}) []interface{}
Slice creates a slice from a bunch of arguments
func ToBool ¶
func ToBool(in interface{}) bool
ToBool converts an arbitrary input into a boolean. Possible non-boolean true values are: 1 or the strings "t", "true", or "yes" (any capitalizations) All other values are considered false.
func ToFloat64 ¶
func ToFloat64(v interface{}) float64
ToFloat64 - convert input to a float64, if convertible. Otherwise, returns 0.
Types ¶
This section is empty.