by doragcoder · 11y ago · 0 comments
Then make a Draw() method on the single object default to what you expect. The simple inline explanation is:
type SingleObject struct {
Cowboy
Shape
}
Access is as follows to be unambiguous: Woody.Cowboy.Draw()
Woody.Shape.Draw()They all are the same interface and can be passed into each other's methods, leading to a logical error.