package models import ( "github.com/gocarina/gocsv" ) type Group struct { Meta Name string Participants []*Participant } func (g *Group) String() string { return g.Name } func (g *Group) GetHash() string { return "" } func (g *Group) Marshal() ([]byte, error) { return gocsv.MarshalBytes(g.Participants) } func (g *Group) Unmarshal(data []byte) error { return gocsv.UnmarshalBytes(data, &g.Participants) }