Documentation
¶
Overview ¶
Package values provides arbitrary variable type utilities
Index ¶
- func GetKeyedBool(name string, data interface{}) (value bool, ok bool)
- func GetKeyedType(kind reflect.Kind, name string, data interface{}) (value reflect.Value, ok bool)
- func GetKeyedValue(name string, data interface{}) (value reflect.Value, ok bool)
- func IsEmpty(value interface{}) (empty bool)
- func ToString(value interface{}) (v string)
- func TypeOf(value interface{}) (name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKeyedBool ¶ added in v1.1.0
GetKeyedBool uses GetKeyedType to retrieve a bool value
func GetKeyedType ¶ added in v1.1.0
GetKeyedType uses GetKeyedValue and only returns the value if it is of the specified `kind`
func GetKeyedValue ¶ added in v1.1.0
GetKeyedValue uses reflection to inspect the data given and if it's a struct or map, check for the named key and return reflect.Value and ok equals true if the value is a valid reflect.Value
func IsEmpty ¶
func IsEmpty(value interface{}) (empty bool)
IsEmpty return true if the arbitrary value is empty (or zero)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.