Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
flashmob
on March 20, 2018
|
parent
|
context
|
favorite
| on:
How to Use Go Interfaces
Perhaps you could try creating a struct with just the common properties, then embed the common struct in all your 'extended' structs. Eg.
http://www.hydrogen18.com/blog/golang-embedding.html
holografix
on March 21, 2018
[–]
That sounds like a bit of a hack. I like it.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: