-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Less naked returns #25713
Less naked returns #25713
Conversation
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.
Thanks, I would have been rather lost if I had attempted some of these fixes, so the help is very welcome.
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, but some of the changed methods still have return names.
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 have objection for removing the named return value.
For maintainability , IMO it's better to:
Keep the named return value (
func foo() (canRead, canWrite bool)
) and use full return statement (return canRead, canWrite
orreturn false, false
)
well the rest is just bike-shading in my opinion |
Overall LGTM (2 nits above) |
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
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.
Hmm, I meant ToRef
itself but not only the comment #25713 (comment)
(only a nit, so LGTM)
just a step towards #25655