deepdiff
Diff deeply
Usages
deepdiff
DeepDiff
can deeply print the differences about two objects.
DeepDiff
is a rewrote version
upon [d4l3k/messagediff](d4l3k/messagediff at v1.2.1 (github.com)). This new
code enables user-defined comparer for you.
Ignored Names
diff.WithIgnoredFields(names...)
can give a list of
names which should be ignored when comparing.
Slice-Order Insensitive
In normal mode, diff
is slice-order-sensitive, that means, [1, 2] != [2, 1]
. WithSliceOrderedComparison(b bool)
can unmind the
differences of order and as an equal.
Customizing Comparer
For example, evendeep
ships a timeComparer
:
And it has been initialized into diff info struct. timeComparer
provides a semantic comparing for time.Time
objects.
To enable your comparer,
use diff.WithComparer(comparer)
.
How is this guide?
Edit on GitHub
Last updated on