3 ms·
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
by flashmob 9y ago
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 http://www.hydrogen18.com/blog/golang-embedding.html
- holografix 9y agoThat sounds like a bit of a hack. I like it.