Re: [go-nuts] Using struct{} for context keys

2023-05-29 Thread Andreas Götz
Thank you. Zero values are of course identical. I was only thinking about the pointer case... On Sunday, May 28, 2023 at 5:10:33 PM UTC+2 burak serdar wrote: > Two values A and B are equal (A==B) if A and B have the same type and the > same values. In a code where > > a:=clientContextKey{} >

Re: [go-nuts] Using struct{} for context keys

2023-05-28 Thread burak serdar
Two values A and B are equal (A==B) if A and B have the same type and the same values. In a code where a:=clientContextKey{} b:=clientContextKey{} a==b is true, because they have the same types, and they have the same values (i.e. the empty value). Note however: a:=&clientContextKey{} b:=&cl