cannot convert a (type interface {}) to type string: need type assertion
cannot
convert a (type interface {}) to type *: need type assertion
解决方案:
var a interface{} = int(10)
var b MyInt = a.(MyInt)
参考:
http://stackoverflow.com/questions/19577423/how-to-cast-to-a-type-alias-in-go/19579058
有疑问加站长微信联系(非本文作者)
本文来自:CSDN博客
感谢作者:u010499721
查看原文:golang解决cannot convert a (type interface {}) to type *: need type assertion