Documentation ¶
Index ¶
- func FilterField(typ interface{}, field string, opt cmp.Option) cmp.Option
- func IgnoreFakeClientPopulatedFields() cmp.Option
- func IgnoreLeftHandUnset(typ interface{}, fields ...string) cmp.Option
- func IgnoreOtherFields(typ interface{}, fields ...string) cmp.Option
- func IgnoreStringSliceOrder() cmp.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterField ¶
FilterField return a new option that only apply specified option to specific struct field.
func IgnoreFakeClientPopulatedFields ¶
IgnoreFakeClientPopulatedFields is an option to ignore fields populated by fakeK8sClient for a comparison. Use this when comparing k8s objects in test cases. These fields are ignored: TypeMeta and ObjectMeta.ResourceVersion
func IgnoreLeftHandUnset ¶
IgnoreLeftHandUnset is an option that ignores struct fields that are unset on the left hand side of a comparison. Note:
- for map and slices, only nil value is considered to be unset, non-nil but empty is not considered as unset.
- for struct pointers, nil value is considered to be unset
func IgnoreOtherFields ¶
IgnoreOtherFields is option that only compare specific structures fields.
func IgnoreStringSliceOrder ¶
IgnoreStringSliceOrder is option that compare string slices without order.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.