type switches
type switch 是一种固定的格式吗?还是基于 switch 条件控制的?
A type switch is a construct ``` func do(i interface{}) { switch v := i.(type): case int:
case string:
default:
} ```
type switch 是一种固定的格式吗?还是基于 switch 条件控制的?
A type switch is a construct ``` func do(i interface{}) { switch v := i.(type): case int:
case string:
default:
} ```