-
Notifications
You must be signed in to change notification settings - Fork 74
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
Replace the interface{} type with the shorter any #630
Replace the interface{} type with the shorter any #630
Conversation
/kind cleanup |
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.
I just have one concern, even though this is a cleanup. We should not edit the generated code. The rest of the changes are fine. Because if the proto files are edited, those code will get overwritten.
Do we want to patch the changes every time?
9afbfb7
to
d63fdee
Compare
@avinal good point. I updated the PR to exclude the .pb.go files as well (in addition to vendor/). |
Go 1.18 includes the predeclared identifier "any", which is a shorter alias of "interface{}". The following command was used to replace each instance of "interface{}" with "any" in the codebase excluding the vendor directory and auto generated protobuf files (.pb.go). `gofmt -r 'interface{} -> any' -w .`
d63fdee
to
9d244ae
Compare
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.
Looks good to me
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: avinal, sayan-biswas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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
Go 1.18 includes the pre-declared identifier "any", which is a shorter alias of "interface{}". The following command was used to replace each instance of "interface{}" with "any" in the codebase excluding the vendor directory and auto generated protobuf files (.pb.go).
gofmt -r 'interface{} -> any' -w .
/kind misc
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep