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