aavaz-ai / go-guide

The Uber Go Style Guide.
Apache License 2.0
0 stars 0 forks source link

Clarity on argument as pointer vs as value #2

Closed kaushalvivek closed 2 years ago

kaushalvivek commented 2 years ago

Methods with value receivers can be called on pointers as well as values. Methods with pointer receivers can only be called on pointers or addressable values.

kaushalvivek commented 2 years ago

https://golang.org/doc/effective_go.html#pointers_vs_values