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 and type can be updated.
When target is a pointer, and ¶
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
func (*StructField) IsPointer ¶ added in v1.3.1
func (s *StructField) IsPointer() bool
Click to show internal directories.
Click to hide internal directories.