qmuntal / stateless

Go library for creating finite state machines
https://wikipedia.org/wiki/Finite-state_machine
BSD 2-Clause "Simplified" License
974 stars 53 forks source link

feat: add OnExitWith configuration method #76

Closed Metamogul closed 6 months ago

Metamogul commented 7 months ago

This PR closes #75. It adds an additional configuration method OnExitWith that allows setting a specific action for leaving a state with a specific trigger similar to OnEntryFrom.

Metamogul commented 6 months ago

Sure thing! Looks like I had overlooked some tests; I've matched the coverage so it is en par now with the existing tests for OnEntryFrom.