func NewTrapLog(e event.Event) EventLogger { return &trapLog{ID: trap.Identifier(e.SubID), Num: e.Num} }
func (e *Event) BuildTrap() (trap.Trap, error) { if !e.IsTrap() { return trap.Trap{}, errors.New("build error missmatch event " + string(e.ID)) } return trap.ResolveTrap(trap.Identifier(e.SubID)), nil }