Documentation
¶
Index ¶
- func CheckImplements[T any, I any]() bool
- func GetFieldValue(obj any, fieldName string) (any, error)
- func IterFields(v interface{}, fn func(f reflect.StructField) error) error
- func SetFieldValue(obj interface{}, fieldName string, value interface{}) error
- func StructType(v any) reflect.Type
- type StructField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IterFields ¶
func IterFields(v interface{}, fn func(f reflect.StructField) error) error
遍历StructField
func SetFieldValue ¶
使用反射设置结构体字段的值
Types ¶
type StructField ¶
type StructField reflect.StructField
Click to show internal directories.
Click to hide internal directories.