I don't understand why the first result is false while second is true.
Any help will be appreciated.
func main() {
var i interface{}
i = uint64(0)
fmt.Println("[1] ", reflect.TypeOf(i), i == 0)
i = 0
fmt.Println("[2] ", reflect.TypeOf(i), i == 0)
var n uint64 = 32
fmt.Println("[3] ", reflect.TypeOf(n), n == 32)
}
// result
// [1] uint64 false
// [2] int true
// [3] uint64 true
Try it here Go playground