Original post

If you’ve ever come across messages like these, you’ll no doubt have used type assertion already. This is a post explain how and why to use it.
cannot convert result (type interface {}) to type float64: need type assertion invalid operation: myInt += 5 (mismatched types interface {} and int) Functions and packages will at times return interface{} as a type because the type would be unpredicable or unknown to them.