Closed ilyakaznacheev closed 2 years ago
It would be great to add a context to event trigger function and event handler function signature because it is required in many operations.
Probably it will require to double the methods (i.e. fsm.EventContext(ctx, event, args...) and type CallbackContext func(ctx, *Event).
fsm.EventContext(ctx, event, args...)
type CallbackContext func(ctx, *Event)
Good suggestion! Will look into it when I have some time.
👏
It would be great to add a context to event trigger function and event handler function signature because it is required in many operations.
Probably it will require to double the methods (i.e.
fsm.EventContext(ctx, event, args...)
andtype CallbackContext func(ctx, *Event)
.