3 ms·
I think people might just be surprised at the idea that there should never be any method that takes a struct by value instead of a pointer (because someone coul
by anonymoushn 5y ago
I think people might just be surprised at the idea that there should never be any method that takes a struct by value instead of a pointer (because someone could create an interface containing that method) and that every method with a pointer receiver must handle nil.
The official golang tutorial explicitly does not say "never use struct receivers at all" even though using them is "lying."