You can't do that with interfaces, embedding struct or not. You can only 
call methods on interfaces or assert to a type.

On Wednesday, 2 May 2018 05:48:26 UTC+8, Mark Nahabedian wrote:
>
> b2 isn't in my most recent example.  Thus gets the error that n2.inputs is 
> not defined. 
>
> func (n1 *basicNode) OutputsTo(n2 node) { 
>         n2.inputs = append(n2.inputs, n1) 
>         n1.outputs = append(n1.outputs, n2) 
> }

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

Reply via email to