github.com/Gurpartap/statemachine-go (go): Package statemachine provides a convenient implementation of a Finite-state Machine (FSM) in Go. Learn more about FSM on Wikipedia:  Let's begin with an object that can suitably adopt state machine behaviour:  Here we're embedding `statemachine.Machine` into our Turnstile struct. Embedding, although not necessary, is a suitable way to apply the state machine behaviour to the struct itself. Turnstile's DisplayMsg variable stores the text that is displayed to the user, and may store either "Pay" or "Go", depending on the state.  Now let's set our state machine's definitions utilizing `MachineBuilder`:  Now that our turnstile is ready, let's take it for a spin:
Keywords: decision|decision-trees|declarative-routing|deterministic-finite-automata|finite-state-machine|fsm|go|golang|state|state-machine|statecharts|statemachine|workflow