TODO(≥go1.18): Use any instead of interface{}. Equal reports whether x and y are equal by recursively applying the following rules in the given order to x and y and all of their sub-values: - Let S be the set of all [Ignore], [Transformer], and [Comparer] options that remain after applying all path
(x, y interface{}, opts ...Option)
| 93 | // If there is a cycle, then the pointed at values are considered equal |
| 94 | // only if both addresses were previously visited in the same path step. |
| 95 | func Equal(x, y interface{}, opts ...Option) bool { |
| 96 | s := newState(opts) |
| 97 | s.compareAny(rootStep(x, y)) |
| 98 | return s.result.Equal() |
| 99 | } |
| 100 | |
| 101 | // Diff returns a human-readable report of the differences between two values: |
| 102 | // y - x. It returns an empty string if and only if Equal returns true for the |