Why is it I can't have this in golang?
type EventDefinition struct {
Name string
EventProperties interface{}
}
Where EventProperties can be one of may types of structs, each struct with different fields. The idea is to have an EventDefinition with EventProperties
type Party struct {
Location string
Hour string
}
or
type Wedding struct {
Bride string
Groom string
Hour string
}
or
type Graduation struct {
Location string
Graduate string
}
Found my problem. The problem was not related to this issue, the problem was
Location : event.Party.Location.(string),
At some point in my implementation I was doing this when Location was a nil interface{}, hence the blowup.
As a response to this, it is possible to do what I mentioned.