gob question. I have the follow structs:
On Sun, Mar 18, 2012 at 11:58 AM, Peter Bourgon <pe...@bourgon.org> wrote:
> Invert your structure. Your Internal may embed a SomeMessage.
The problem is that I want access to the fields of SomeMessage so I
can easily fill them in.
And there is in actually SomeMessage1, SomeMessage2, etc.
I guess I could add a function on Internal like
External() interface{}
and then
msg.External().(*SomeMessage2).Foo = "whatever"
but that seems a bit messy.
Thanks for the idea though. Maybe there's still something I can do with it.
Regards
Albert