-
Notifications
You must be signed in to change notification settings - Fork 4.5k
resolver: convert EndpointMap to use generics #8189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8189 +/- ##
==========================================
- Coverage 82.06% 81.93% -0.14%
==========================================
Files 410 410
Lines 40233 40216 -17
==========================================
- Hits 33018 32949 -69
- Misses 5854 5892 +38
- Partials 1361 1375 +14
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
resolver/map_test.go
Outdated
@@ -174,7 +174,7 @@ func (s) TestAddressMap_Values(t *testing.T) { | |||
} | |||
|
|||
func (s) TestEndpointMap_Length(t *testing.T) { | |||
em := NewEndpointMap() | |||
em := NewEndpointMap[any]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use struct{}
as a more precise type parameter here, and int
in the test cases below. Any reason to use any
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I just did the simplest change possible for the tests, but using the proper type is better.
This is #8187 but for EndpointMap. In this case, I could find zero external usages of this type, since it is so new, so I thought it would be OK to just convert it in place.
RELEASE NOTES: