-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This helper function makes it easier to specify that comparable types are safe to directly compare with the == operator in Go. The API does not use generics as it follows existing options like cmp.AllowUnexported, cmpopts.IgnoreUnexported, or cmpopts.IgnoreTypes. While generics provides type safety, the user experience is not as nice. Our current API allows multiple types to be specified: cmpopts.EquateComparable(netip.Addr{}, netip.Prefix{}) While generics would not allow variadic arguments: cmpopts.EquateComparable[netip.Addr]() cmpopts.EquateComparable[netip.Prefix]() Bump mininimum supported Go to 1.18 for net/netip type. Start testing on Go 1.21. Fixes #339
- Loading branch information
Showing
4 changed files
with
64 additions
and
2 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
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