最近写Golang的是发现一个fallthrough与switch的坑:

switchvalue.(type){caseint:fallthroughcaseint64://......}

编译就报错:

cannotfallthroughintypeswitch

WHAT????

在typeswitch 中不能使用

fallthrough

只能修改代码:

switchvalue.(type){caseint,int64://......}