Golang之类型判断
三种类型判断的方式
switch v.(type) {
case int:
return "int"
case uint:
return "uint"
default:
_ = v
return "unknown"
}参考
Last updated
switch v.(type) {
case int:
return "int"
case uint:
return "uint"
default:
_ = v
return "unknown"
}Last updated