考虑: type MyInterface interface{
MyMethod() int
}
var im MyInterface
...
如果我称之为: switch t := im.(type) {
case:....
default:...
}
什么是实际类型变量t的当它被宣布?为了说明这个问题:如果我想写 var t //Wha
我的代码一般是这样的: func BulkInsert(docs interface{}) {
switch data := docs.(type) {
case map[string] *model.SnapshotByConv, map[string] *model.UserSnapshotsMap:
for ver, _ := range data {