On Sun, Jul 24, 2011 at 18:13, si guy <
sjw...@gmail.com> wrote:
> In the various Go documents it is stated that channel values are *always*
> pointers (effectively).
> Simple question, does this include channels that are embedded in nested
> structs.
> eg:
> type A struct {
>
> B
>
> }
> type B struct {
>
> myCh chan interface{}
>
> }
> Can I pass an instance of A as a value, and still retain the myCh pointer?
Yes. Copying just copies all the field values,
as if by repeated assignment statements.
It doesn't do anything special.