Re: [go-nuts] Struct with Interfaces fields as key in maps

2022-08-31 Thread antonio.o...@gmail.com
> This works in general, but your example is flawed. oh, my bad, thanks for the clarification > you'll receive a runtime panic instead of a compile error. yeah, I've received the same feedback offline from one colleague some minutes ago ... it is a bad idea Thanks On Wednesday, 31 August 2022

Re: [go-nuts] Struct with Interfaces fields as key in maps

2022-08-31 Thread burak serdar
On Wed, Aug 31, 2022 at 7:28 AM antonio.o...@gmail.com < antonio.ojea.gar...@gmail.com> wrote: > Hi, > > Based on the documentation: > > "The map key can be any type that is comparable." > "Struct values are comparable if all their fields are comparable. Two > struct values are equal if their corr