Hi All,

I am confused by the interface and nil.

var a *int = nil
if a == nil {
   fmt.Println("aaaaaa")
}
var b interface{} = a
if b == nil {
   fmt.Println("bbbbbb")
}

The above code shows b is not nil, can anybody help me figure out why?

Regards,
Teng

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to