Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareIgnoreTargetEmpties ¶
func CompareIgnoreTargetEmpties(liveObject interface{}, desiredObject interface{}) string
CompareIgnoreTargetEmpties diffs two Golang objects recursively, but treats any elements whose values are empty in the 'desiredObject' as "no diff". This is useful in a particular situation of comparing Kubernetes objects:
- The 'desiredObject' is constructed via code. It will almost certainly have many, many (nested) empty values.
- It is compared against a 'liveObject', which has been retrieved live from the Kubernetes API, and has many of these empty values populated with (k8s-generated) default values.
In this situation, to determine whether our desiredObject is truly different than the liveObject, we ignore processing of elements whose values are empty in the desiredObject.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.