AddDiff can be used by custom comparison functions to register a new difference. The current handler will be invoked with the current path plus a Diff fragment.
(reference, value interface{})
| 66 | // AddDiff can be used by custom comparison functions to register a new difference. |
| 67 | // The current handler will be invoked with the current path plus a Diff fragment. |
| 68 | func (t Comparator) AddDiff(reference, value interface{}) { |
| 69 | t.Handler(t.Path.Diff(reference, value)) |
| 70 | } |
| 71 | |
| 72 | func (t Comparator) compareValues(v1, v2 reflect.Value, ptr bool) { |
| 73 | // First see if we have seen this comparison already |