On 03/08/16 07:34, Rayland wrote:
> How can I use reflect to detect all fields that have the zero value, on
> a pointer object?
Here is a bit of code I wrote which overrides all the non zero fields in
one struct, from another which might be helpful for you to look at.
// SetDefaults for config fr
You use
https://godoc.org/reflect#Value.Field
https://godoc.org/reflect#Zero
https://godoc.org/reflect#Value.Interface
and read the docs :)
Don't take this the wrong way, but reflect isn't for the gentle-spirited,
it's ugly, errorprone and hard. You probably don't want to use it and if
you need to
Hi all,
How can I use reflect to detect all fields that have the zero value, on a
pointer object?
Thank you
--
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 g