On Sun, Dec 10, 2017 at 8:46 AM,  <mi...@ubo.ro> wrote:
>
> I had some code that I didn't touch for a while and now it seems it's
> broken. It panics with `reflect.StructOf: field 0 has no name` at runtime.
> Wasn't Go supposed to have some sort of compatibility promise?
>
> After a while I've found this[1]  issue which seems to be the reason why my
> program panics now and my question is why is a struct field without a name
> invalid ? Anonymous fields are supposed to have no field names, right?
>
>  https://github.com/golang/go/issues/20600

Yes, unfortunately we had to change the way that it worked.  To make
an anonymous field, set the name to the type name and set Anonymous to
true.

Ian

-- 
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.

Reply via email to