Skip to content

Glossary: Software Design Patterns in Go

Liskov substitution principle (LSP)

Also written: LSP, Liskov substitution

The SOLID principle that anything fitting a type must work wherever that type works. A `LockedCard` that panics in `TopUp` breaks the promise of the `Card` interface.

Where the book teaches it

Related terms

SOLIDInterfacePanic