package cast

Import Path
	github.com/spf13/cast (on go.dev)

Dependency Relation
	imports 8 packages, and imported by one package

Involved Source Files Package cast provides easy and safe casting in Go. caste.go
Package-Level Functions (total 59, in which 55 are exported)
StringToDate attempts to parse a string into a time.Time type using a predefined list of formats. If no suitable format is found, an error is returned.
ToBool casts an interface to a bool type.
ToBoolE casts an interface to a bool type.
ToBoolSlice casts an interface to a []bool type.
ToBoolSliceE casts an interface to a []bool type.
ToDuration casts an interface to a time.Duration type.
ToDurationE casts an interface to a time.Duration type.
ToDurationSlice casts an interface to a []time.Duration type.
ToDurationSliceE casts an interface to a []time.Duration type.
ToFloat32 casts an interface to a float32 type.
ToFloat32E casts an interface to a float32 type.
ToFloat64 casts an interface to a float64 type.
ToFloat64E casts an interface to a float64 type.
ToInt casts an interface to an int type.
ToInt16 casts an interface to an int16 type.
ToInt16E casts an interface to an int16 type.
ToInt32 casts an interface to an int32 type.
ToInt32E casts an interface to an int32 type.
ToInt64 casts an interface to an int64 type.
ToInt64E casts an interface to an int64 type.
ToInt8 casts an interface to an int8 type.
ToInt8E casts an interface to an int8 type.
ToIntE casts an interface to an int type.
ToIntSlice casts an interface to a []int type.
ToIntSliceE casts an interface to a []int type.
ToSlice casts an interface to a []interface{} type.
ToSliceE casts an interface to a []interface{} type.
ToString casts an interface to a string type.
ToStringE casts an interface to a string type.
ToStringMap casts an interface to a map[string]interface{} type.
ToStringMapBool casts an interface to a map[string]bool type.
ToStringMapBoolE casts an interface to a map[string]bool type.
ToStringMapE casts an interface to a map[string]interface{} type.
ToStringMapInt casts an interface to a map[string]int type.
ToStringMapInt64 casts an interface to a map[string]int64 type.
ToStringMapInt64E casts an interface to a map[string]int64{} type.
ToStringMapIntE casts an interface to a map[string]int{} type.
ToStringMapString casts an interface to a map[string]string type.
ToStringMapStringE casts an interface to a map[string]string type.
ToStringMapStringSlice casts an interface to a map[string][]string type.
ToStringMapStringSliceE casts an interface to a map[string][]string type.
ToStringSlice casts an interface to a []string type.
ToStringSliceE casts an interface to a []string type.
ToTime casts an interface to a time.Time type.
ToTimeE casts an interface to a time.Time type.
ToUint casts an interface to a uint type.
ToUint16 casts an interface to a uint16 type.
ToUint16E casts an interface to a uint16 type.
ToUint32 casts an interface to a uint32 type.
ToUint32E casts an interface to a uint32 type.
ToUint64 casts an interface to a uint64 type.
ToUint64E casts an interface to a uint64 type.
ToUint8 casts an interface to a uint8 type.
ToUint8E casts an interface to a uint type.
ToUintE casts an interface to a uint type.
Package-Level Variables (only one, which is unexported)