You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Map keys are equal according to the == operator. To use custom comparisons for map keys, consider using cmpopts.SortMaps.
However, I believe the more general issue at hand is that there is no easy way for ignore to conceptually "remove" elements from a slice or map. #28 was trying to solve the application where the zero value of a map element should be removed.
If there's an Ignore rule that matches a key in a map, I'd expect that key
to be ignored even if it doesn't exist in the map being compared to.
For example, the following code says that the two values aren't equal
even though I've specified that the "x" key should be ignored:
It prints:
If I add an "x" key (with any value) to b, then they compare equal as expected.
The text was updated successfully, but these errors were encountered: