12 ms·
You use an interface. Golang use duck typing. It is very flexible and very simple. (Some times too simple)
by j16sdiz 8y ago
You use an interface.
Golang use duck typing. It is very flexible and very simple. (Some times too simple)
- kuschku 8y agoSo how do I make e.g. a TreeSet of something, put my elements in, and get them back out as the same type, without casting?