On Sun, 2016-09-11 at 19:41 +1000, Kiki Sugiaman wrote: > Not exactly a solution for the faint hearted, hah!
It's long, but not complicated, and in the context of Axel's comment would be placed in a helper of some variety. For those at home, it's necessary to take the address of the interface value so that it's not passed as the interface{} that reflect.ValueOf (so it retains the Fooer type indirectly via a *Fooer), the first Elem dereferences that pointer to get the original Fooer, then the second gets the concrete value in the Fooer, and finally IsNil does what it says. The only thing here that is possible a trap for novitiates is that you need to do the &I, Elem dance. -- 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.