http://stackoverflow.com/a/1727737/283851

I decided to use it as an exercise to try out embedded structs and

interfaces.

Here's what I got so far:

https://gist.github.com/mindplay-dk/807179beda57e676b8fb

What I can't figure out is... interfaces can't have methods (?) ... so how

do I write the Withdraw() method in such a way that it can work with either

a BankAccount or an OverdraftAccount?

I'm sure I'm thinking about this all wrong :-)

Tell me how a Go developer would attack this problem?

Thanks!

- Rasmus

--

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/groups/opt_out.