TL;DR See playground link at bottom.
I have methods defined on a Manager
struct which contains a Context
. The Manager
s are versioned, allowing a new version to only define functions which have changed, and automatically use the functions from the old version if they are not redefined.
type Context struct { ... }
type Manager1 struct{
Context Context
}
type Manager2 struct {
Manager1
Context Context
}
When calling a function on Manager2
which is not defined on Manager2
the Context
is nil. Is there a way to do this where the context will be available?
This example demonstrates the problem better than I can explain it: http://play.golang.org/p/gFe6GgUKEJ