-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
.golangci.yml: enable recvcheck #5758
Conversation
026895d
to
c02f0c6
Compare
b46c1b3
to
30f3801
Compare
What is it checking? What are the warning? Is it fixing bugs, or style? Lots of semantic changes, some are affecting performance, but unclear why the new code is better. |
Short answer - mostly style. https://go.dev/doc/faq#methods_on_values_or_pointers _Next is consistency. If some of the methods of the type must have pointer receivers, the rest should too, so the method set is consistent regardless of how the type is used. See the section on method sets for details. For types such as basic types, slices, and small structs, a value receiver is very cheap so unless the semantics of the method requires a pointer, a value receiver is efficient and clear._ https://dave.cheney.net/2016/03/19/should-methods-be-declared-on-t-or-t |
#5761 to only delete unused |
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.
Look fine to me, I will defer to Aleksandr since it touches prog expressions code.
0e7c5e2
to
35d6020
Compare
35d6020
to
7c1f120
Compare
The plan was to make a few trivial fixes, but something went wrong...