Fix Election JSON marshalling This prevents an infinite loop.
1 files changed, 4 insertions(+), 1 deletions(-) M election/election.go
M election/election.go => election/election.go +4 -1
@@ 39,7 39,10 @@ func NewElection(candidates []Candidate, createEventId id.EventID, } func (el *Election) UnmarshalJSON(b []byte) error { err := json.Unmarshal(b, &el) type Alias Election // create alias to prevent endless loop tmp := (*Alias)(el) err := json.Unmarshal(b, tmp) if err != nil { return err }