The discordance is unexpected. On Mon, 2018-01-22 at 19:28 -0500, Josh Humphries wrote: > I think that is expected, and it is the JSON marshaling that is > surprising > (and erroneous). > > If it were expected that the embed field names resolved to the alias > *target > type* name, it would instead be a compiler error since the compiler > does > not allow embedded types that would result in name collisions. Using > reflection, one can see the fields are named just as in your example, > after > the type aliases, not its underlying type name. The bug is that JSON > marshaling is not looking at the field name and instead looking > directly at > the field type name (which, in this case, has been resolved to int).
-- 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.