Skip to content

Commit

Permalink
update stm package docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hermannm committed May 29, 2022
1 parent 97e6123 commit 7210375
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stm/stm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"
)

// A state machine is a type with a configured set of states with corresponding state functions,
// A state machine is a type with a configured set of states and corresponding state functions,
// and a method for running the machine.
// The type parameter here is to avoid self-reference, but typically points back to the implementer.
type StateMachine[Machine any] interface {
Expand All @@ -25,7 +25,7 @@ type StateID int
// A function to run when in a given state.
// Returns when transitioning states (typically after an event triggers), or when an error occurs.
// Takes a type parameter for the type of state machine to execute on.
type StateFunc[Machine any] func(machine Machine) (nextState StateID, err error)
type StateFunc[Machine any] func(Machine) (nextState StateID, err error)

// A map of possible states for a state machine.
// Takes a type parameter for the type of state machine to attach to.
Expand Down

0 comments on commit 7210375

Please sign in to comment.