3 ms·
> switch on .(type) For anyone wondering switch val := heap.Pop(key).(type) { case (*MyType): // We're all good default: // Didn't
by hornetblack 12y ago
> switch on .(type)
For anyone wondering
switch val := heap.Pop(key).(type) {
case (*MyType):
// We're all good
default:
// Didn't get a (*MyType)
}