Skip to content
Digital Garden
Search
K
Main Navigation
thien.dev
GitHub
Twitter
Appearance
GitHub
Twitter
Menu
Return to top
On this page
Table of Contents for current page
Go methods
Methods are just like functions
Method consists func keyword, the receiver arg, and the function body
Receiver is just a type.
2 types of receiver: value & pointer
https://gronskiy.com/posts/2020-04-golang-pointer-vs-value-methods/
https://go.dev/play/p/RHqwOHD0qIh
https://stackoverflow.com/questions/48790663/why-value-stored-in-an-interface-is-not-addressable-in-golang#48874650w