Skip to content

Glossary: Software Design Patterns in Go

State machine

Something that is always in exactly one of a fixed set of states, with rules for moving between them. An order goes placed, paid, shipped, delivered, and can be cancelled only before it ships.

Where the book teaches it

Related terms

TransitionState