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
Seem to imply that functions can only be assigned to structs, however all user defined types can have methods. There is nothing unique about structs with regard to method/function declaration.
https://github.com/basti1302/go-lang-cheat-sheet/blame/master/README.markdown#L345
and
https://github.com/basti1302/go-lang-cheat-sheet/blame/master/README.markdown#L361-L363
Seem to imply that functions can only be assigned to structs, however all user defined types can have methods. There is nothing unique about structs with regard to method/function declaration.
see example:
https://play.golang.org/p/DPFZz0mCbi
The text was updated successfully, but these errors were encountered: