You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this is expected behavior, Then the go tour should be changed/ fixed, because it's saying to NOT have mixed methods on type, e.g on value and pointer receiver methods.
If this is expected behavior, Then the go tour should be changed/ fixed, because it's saying to NOT have mixed methods on type, e.g on value and pointer receiver methods.
I'm not sure it's related.
What go tour said mean you should declare all methods of a type using either only pointer receiver, or only value receiver. This is true in this example, all methods are declared with pointer receiver.
The issue here is that method with value receiver of type T will be available for type *T, but not vice versa. That mean *Foo is a LogValuer, but Foo is not, because Foo don't have LogValue method.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
YES
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: