golang-cheat-sheet
golang-cheat-sheet copied to clipboard
All non-built in types can have methods
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
Care to provide a pull request?