err := mediator.Register(func(command FooEvent){
return nil
})
err := mediator.Register(func(command FooEvent) error{
return errors.New("db error")
})
err := mediator.Register(func(command FooEvent) (string,error){
return "command executed", nil
})