Let's suppose a.Worker and b.Worker both have method Work(c.Arg) where c.Arg is 
a struct instead of an interface. The compiler now recognizes both a.Worker and 
b.Worker as identical although both live in different packages. The code will 
compile just fine.

I don't think it matters where the type lives. My understanding is that the 
intent of Go's interface to allow substitution of any type as long as the type 
satisfies the required method signatures.

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

Reply via email to