https://github.com/drgrib/type-method-demo
Demonstrates the unique properties of type methods in Go
https://github.com/drgrib/type-method-demo
go golang methods types
Last synced: 29 days ago
JSON representation
Demonstrates the unique properties of type methods in Go
- Host: GitHub
- URL: https://github.com/drgrib/type-method-demo
- Owner: drgrib
- Created: 2017-06-02T21:39:02.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-02T21:49:08.000Z (about 9 years ago)
- Last Synced: 2025-12-27T02:53:07.706Z (6 months ago)
- Topics: go, golang, methods, types
- Language: Go
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a demo of one of the most confusing but useful topics in Go: how methods are attached to types rather than classes, unlike other modern languages like C++, Python, and Java.
The tests can be executed using
```
go test -v
```