Documentation
¶
Index ¶
- func SetFloatListReflectValue[To cast.FloatNumber](value reflect.Value, v interface{}) error
- func SetIntListReflectValue[To cast.Number](value reflect.Value, v interface{}) error
- func SetReflectValue(dst reflect.Value, src interface{}) error
- func SetStringMapListReflectValue[To interface{}](mapSlice reflect.Value, v interface{}) error
- func StripInterface(v reflect.Value) reflect.Type
- func StripInterfaceFromValue(v reflect.Value) reflect.Value
- func StripInterfaceValue(v interface{}) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFloatListReflectValue ¶
func SetFloatListReflectValue[To cast.FloatNumber](value reflect.Value, v interface{}) error
func SetIntListReflectValue ¶
func SetReflectValue ¶
func SetStringMapListReflectValue ¶ added in v0.5.9
func StripInterface ¶ added in v0.5.33
StripInterface takes a reflect.Value and returns the underlying type by recursively stripping off interface{} types while preserving pointer types.
For example: - string -> string - interface{}(string) -> string - *string -> *string - interface{}(*string) -> *string - *interface{}(string) -> *string - interface{}(*interface{}(string)) -> *string
If the value is invalid or nil, returns nil.
func StripInterfaceFromValue ¶ added in v0.5.33
StripInterfaceFromValue takes a reflect.Value and returns the underlying value by recursively stripping off interface{} types while preserving pointer types.
For example: - string -> string value - interface{}(string) -> string value - *string -> *string value - interface{}(*string) -> *string value - *interface{}(string) -> *string value - interface{}(*interface{}(string)) -> *string value
If the value is invalid or nil, returns an invalid reflect.Value.
func StripInterfaceValue ¶ added in v0.5.33
func StripInterfaceValue(v interface{}) interface{}
StripInterfaceValue takes an interface{} and returns the underlying value by recursively stripping off interface{} and pointer types.
For example: - string -> string value - interface{}(string) -> string value - *string -> string value - interface{}(*string) -> string value - *interface{}(string) -> string value - interface{}(*interface{}(string)) -> string value
If the value is nil, returns nil.
Types ¶
This section is empty.