On Sat, 2020-07-25 at 01:09 -0700, chri...@surlykke.dk wrote:
> &(*f1) 
> 
> would, first, create a copy of *f1, and then a pointer to that copy,
> but evidently f2 becomes a pointer to the same struct as f1. Is this
> something I should have deduced from the language spec?

&(*p) says "give me the address of the thing that is pointed to by p".
This is p.

If you assign the value of *p to another variable and take the address
of that, then you'll get the outcome you were wanting.



-- 
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/715c99a366a243ff9768a22f96c5a1dc147ace01.camel%40kortschak.io.

Reply via email to