All non-built in types can have methods
オープン
- 主要言語
- 言語のデータがありません
- スター
- 8.8k
- フォーク
- 1.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。