First link in my first reply didn't use encapsulation. It gave Dog as 
parameter. Also not sure how golang internals work but when you encapsulate 
something thats probably new heap allocation.
I know it's tempting to use OO patterns (classes) but golang has very powerful 
interface system and I think it should be used instead in most of the cases. 
Example every struct that has method Attack will automatically implement 
Attacker interface with Attack function.
If I where you I would first learn go way of doing things and adjust your code 
when migrating. You will win in the long run with readability and 
maintainability.

-- 
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