-
Notifications
You must be signed in to change notification settings - Fork 828
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
Update .golangci.yml
config to resolve deprecation warnings
#4082
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,7 +286,6 @@ func convertInternalLabelSelectorToLabelSelector(in *metav1.LabelSelector) *pb.L | |
func convertInternalLabelSelectorsToLabelSelectors(in []allocationv1.GameServerSelector) []*pb.GameServerSelector { | ||
var result []*pb.GameServerSelector | ||
for _, l := range in { | ||
l := l | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain this pattern? It seems.... weird? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After enabling the
I’ve cleaned up these instances to resolve the linter errors. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I was sure I've already added this comment |
||
c := convertInternalGameServerSelectorToGameServer(&l) | ||
result = append(result, c) | ||
} | ||
|
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.
The warning for this was:
Should we replace it, rather than just delete it? (Same for all the other ones as well?)
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.
Thank you for pointing that out! I’ve updated the changes to replace the deprecated linters rather than just removing them.
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.
oooh! My bad! I read it as addition, not subtraction.
Sorry! Doing too many things at once 🤦🏻