Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
func Diff(expected, received interface{}) *diff
Diff checks if expected is a subset of received with equal values. Empty or default values are ignored. Passed values must be pointers, otherwise it will error. Uses equality.Semantic for comparison, and runtime.UnstructuredConverter for map extraction. Troublesome behaviour:
- When fields on expected are removed, this will return that they are equal. Technically, that is not the case as they are not equal since the fields got removed (changed). In order to check that case, you can use reflect.DeepEqual on those fields only.
func MergeMapsSrcDst ¶
MergeMapsSrcDst adds data from source to dest
func ObjectType ¶
func ObjectType(obj interface{}) string
func UnsafeMapDiff ¶
func UnsafeMapDiff(objA, objB interface{}) (diffValues, error)
UnsafeMapDiff just returns a diff between two objects. Must pass a reference. TODO: Resolve this for better usage by adding depth/recursive search
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.