Documentation
¶
Overview ¶
Package reflectutil
@author: xwc1125
Package reflectutil ¶
@author: xwc1125
Index ¶
- func DelPointer(w interface{}) interface{}
- func GetFieldName(structName interface{}) []string
- func GetValue(param interface{}) reflect.Value
- func GetValueByFieldName(structName interface{}, fieldName string) interface{}
- func GetValues(param ...interface{}) []reflect.Value
- func ReflectInterface(funcInter interface{}, paramsValue []reflect.Value) []reflect.Value
- func ToPointer(w interface{}) interface{}
- type FieldInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelPointer ¶
func DelPointer(w interface{}) interface{}
func GetFieldName ¶
func GetFieldName(structName interface{}) []string
GetFieldName structName 的 type 不是结构体类型,就会报以下错误:panic: reflect: NumField of non-struct type,故需要在程序中加以判断。 获取结构体中字段的名称
func GetValueByFieldName ¶
func GetValueByFieldName(structName interface{}, fieldName string) interface{}
func ReflectInterface ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.