Example #1
0
func NewTrapLog(e event.Event) EventLogger {
	return &trapLog{ID: trap.Identifier(e.SubID), Num: e.Num}
}
Example #2
0
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
}