Skip to content

Glossary: Software Design Patterns in Go

Global mutable state

Also written: global state, global variable

Data at package level that any code can change. A shared `FreeShippingAt` setting changed by one test makes later tests see the new value, so results depend on test order.

Where the book teaches it

Related terms

SingletonAnti-pattern