Documentation
¶
Overview ¶
Package reflectutil contains various utilities that are useful when working with reflection
Index ¶
- func AutoPointerNewFromType(typ reflect.Type) interface{}
- func AutoPointerNewFromValue(val reflect.Value) interface{}
- func EnsureSinglePointer(obj interface{}) interface{}
- func EnsureSinglePointerType(typ reflect.Type) reflect.Type
- func EnsureSinglePointerValue(val reflect.Value) reflect.Value
- func GetModelName(model interface{}) string
- func NewFromModel(model interface{}) interface{}
- func NewFromType(modelType reflect.Type) interface{}
- func NewPtrValueFromType(modelType reflect.Type) reflect.Value
- func NewSlice(model interface{}) interface{}
- func SetSlice(valueSlice []interface{}, fieldValue reflect.Value)
- func Unwrap(obj interface{}) interface{}
- func UnwrapType(typ reflect.Type) (unwrapped reflect.Type)
- func UnwrapValue(typ reflect.Value) (unwrapped reflect.Value)
- func Wrap(obj interface{}) interface{}
- func WrapValue(val reflect.Value) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoPointerNewFromType ¶ added in v0.5.1
func AutoPointerNewFromValue ¶ added in v0.5.1
func EnsureSinglePointer ¶ added in v0.5.1
func EnsureSinglePointer(obj interface{}) interface{}
func EnsureSinglePointerType ¶ added in v0.5.1
func EnsureSinglePointerValue ¶ added in v0.5.1
func GetModelName ¶
func GetModelName(model interface{}) string
func NewFromModel ¶ added in v0.5.1
func NewFromModel(model interface{}) interface{}
func NewFromType ¶
func NewPtrValueFromType ¶ added in v0.5.1
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.