-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
cleancode:util.go #44913
cleancode:util.go #44913
Conversation
Hi @zhangxiaoyu-zidif. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@k8s-bot ok to test |
gv, err := schema.ParseGroupVersion(g.Versions[i].GroupVersion) | ||
for _, version := range g.Versions { | ||
if version.GroupVersion != "" { | ||
gv, err := schema.ParseGroupVersion(version.GroupVersion) |
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.
Sorry to say this ... but I don't think this make too much difference. Do you have reason to do this, for example, code style best practice?
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.
In function the original point equals the modification point. However modification is much cleaner and lighter than the original point. First, it does not need len(xxx) to know the loop count, and the index is not necessary for the function. Don't you think so?
@k8s-bot ok to test |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nikhiljindal, zhangxiaoyu-zidif
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@k8s-bot verify test this |
Automatic merge from submit-queue |
cleancode, the modification point make code clean and light