caterings/caterings.go
func NewCatering(tournament uuid.UUID, ci Info) (*Catering, error) {
	c := new(Catering)
	c.UUID, _ = uuid.V4()
	c.Tournament = tournament
	if err := mergo.MergeWithOverwrite(&c.Info, ci); err != nil {
		return nil, errors.New(err.Error() + " - Could not set initial catering info")
	}
	if err := storage.Store(c); err != nil {
		return nil, errors.New(err.Error() + " - Could not write catering to storage")
	}
	return c, nil
}
func NewCatering(tournament uuid.UUID, ci Info) (*Catering, error) {
	c := new(Catering)
	c.UUID, _ = uuid.V4()
	c.Tournament = tournament
	if err := mergo.MergeWithOverwrite(&c.Info, ci); err != nil {
		return nil, errors.New(err.Error() + " - Could not set initial catering info")
	}
	if err := storage.Store(c); err != nil {
		return nil, errors.New(err.Error() + " - Could not write catering to storage")
	}
	return c, nil
}
func NewCatering ( tournament uuid . UUID , ci Info ) ( * Catering , error ) { c := new ( Catering ) c . UUID , _ = uuid . V4 ( ) c . Tournament = tournament if err := mergo . MergeWithOverwrite ( & c . Info , ci ) ; err != nil { return nil , errors . New ( err . Error ( ) + " " ) } if err := storage . Store ( c ) ; err != nil { return nil , errors . New ( err . Error ( ) + " " ) } return c , nil }
//
// Catering related functions and methods
//
// Create a Catering
Catering related functions and methods Create a Catering