Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchStruct ¶
PatchStruct patches target with values found in patcher with both target and patcher being structs. Only fields with same name, type, and kind (cannot update pointer values with non pointer values) are updated.
The fields-argument can be used to select which fields gets patched (case-insensitive). If the fields-argument is not provided, all fields of patcher are used to update target.
If any field got update, this function returns true.
Types ¶
type StructField ¶
type StructField struct {
Field reflect.StructField
Value reflect.Value
}
func GetFields ¶
func GetFields(v reflect.Value) []*StructField
Click to show internal directories.
Click to hide internal directories.