What restriction is there on the type of var to compile this i := myVal.(int)?
var
i := myVal.(int)?
myVal must be an integer type, such as int, int64, int32, etc.
myVal
int
int64
int32
myVal must be able to be asserted as an int.
myVal must be a numeric type, such as float64 or int64.
float64
myVal must be an interface.