This is a frequently asked question <https://golang.org/doc/faq#nil_error> (it has nothing to do with the slice).
On Wed, Feb 15, 2017 at 9:40 AM, Felix Sun <sunf...@gmail.com> wrote: > https://play.golang.org/p/qYA8Ddnnye > > ``` > > package main > > import ( > "fmt" > ) > > type Obj struct { > One *Obj > } > > func main() { > var o = &Obj{} > > var arr = []interface{}{o.One} > > fmt.Println(arr[0]) > fmt.Println("why this is not true?", arr[0] == nil) > } > > > ``` > > > Why `arr[0] == nil` is not true? > > -- > 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. > -- 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.