On Thursday, August 18, 2016 at 3:24:12 PM UTC-7, Sridhar wrote: > > I need a little help understanding what's going on here: > > https://play.golang.org/p/8HydwIfgP3 > > The same type is being used to create 2 value pointers. Shouldn't the > created pointers be equal ? >
reflect.DeepEqual takes interfacae{}, you are passing it reflect.Value. The Value objects are not identical (because DeepEqual doesn't recurse into the unsafe.Pointer in Value like it would for a pointer), but the objects they hold are. Comparing s0.Interface() and s1.Interface() returns true: https://play.golang.org/p/eaL2AmeR2z -- 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.