qmuntal / stateless

Go library for creating finite state machines
BSD 2-Clause "Simplified" License
898 stars 47 forks source link

feat: add OnExitWith configuration method #76

Closed Metamogul closed 1 month ago

Metamogul commented 2 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 1 month 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.