-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Equality of schema.Sets gets tricky when dealing with nested sets - Set.Equal only superficially compares the underlying maps and hence any sets nested under the root sets cause issues. This adds a simple method, HashEqual, that does a top-level hash comparison, helping to work around this without any complex re-invention of things like reflect.DeepEqual. Of course, in order to make effective use of this function, the user needs to make sure they are properly hashing their nested sets, however this is trivial with things like HashResource.
- Loading branch information
1 parent
bb00fd4
commit ca42980
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters