pkg/kmp
Dan Gerdesmeier 1095a4eab0 Upgrade go-cmp and add new diff options to kmp (#382)
* Upgrade go-cmp and add new diff options to kmp

* Upgrades go-cmp to master
* Adds new kmp diff options (FieldListReporter and ShortDiffReporter)
* Update comments

FieldListReporter can be used to programatically find what fields differ
between two objects. This is useful in webhook object validation.

ShortDiffReporter was added as the default behavior for cmp.Diff is to
provide more context. The ShortDiff reporter is useful for use on API
fields where context is not necessarily as valuable. This keeps the
output short for use in log and error messages.

* Change from override to constraint

* Code Review Comments

* Improve test coverage

* Use JSON field names when present

No longer lowercase golang field names.

* Strip JSON non-key tag content
2019-04-15 13:41:00 -07:00
..
diff.go Upgrade go-cmp and add new diff options to kmp (#382) 2019-04-15 13:41:00 -07:00
diff_test.go Upgrade go-cmp and add new diff options to kmp (#382) 2019-04-15 13:41:00 -07:00
doc.go Add kmp, a safe wrapper for google/go-cmp (#197) 2018-12-08 08:39:27 -08:00
reporters.go Upgrade go-cmp and add new diff options to kmp (#382) 2019-04-15 13:41:00 -07:00
reporters_test.go Upgrade go-cmp and add new diff options to kmp (#382) 2019-04-15 13:41:00 -07:00