FAQ
b := &*a // 'b' is of type "pointer to Foo".
             // ":=" copies the address of the object into b
             // 'a' is the address of an object
             // '*a' is the object itself
             // &*a or &(*a) is the address of the object located at the
address 'a', which is the same as 'a'

aCopy := *a // 'aCopy' is of type Foo, and '*a' too.
             // ":=' copies the object '*a' into 'aCopy'. That's here that
the copy occurs.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 7 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 12, '15 at 10:57a
activeSep 12, '15 at 5:24p
posts7
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase