Aha, I see. Thanks for explaining.

br. Chr.

lørdag den 25. juli 2020 kl. 10.56.35 UTC+2 skrev Jan Mercl:

> On Sat, Jul 25, 2020 at 10:09 AM chri...@surlykke.dk
> <chri...@surlykke.dk> wrote:
>
> > Is this something I should have deduced from the language spec?
>
> https://golang.org/ref/spec#Address_operators
>
> """"
> For an operand x of type T, the address operation &x generates a
> pointer of type *T to x. The operand must be addressable, that is,
> either a variable, pointer indirection, or slice indexing operation;
> or a field selector of an addressable struct operand; or an array
> indexing operation of an addressable array.
> """"
>
> Note the 'pointer indirection'.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/32fe07f9-91a3-44d5-be72-9953c431936fn%40googlegroups.com.

Reply via email to