4 ms·
I'm not sure I follow what you mean. In Go the equivalent to your example is: switch val := item.(type) { case HouseStruct: case ContainerStruct: }
by kgeist 4y ago
I'm not sure I follow what you mean. In Go the equivalent to your example is:
switch val := item.(type) {
case HouseStruct:
case ContainerStruct:
}
- erik_seaberg 4y agoDoesn’t type switch require an interface value? Go tries not to add boxing-like overhead to generics.
- deleted 4y ago[deleted]