Skip to content

Glossary: Software Design Patterns in Go

Middleware

Code every web request passes through as a chain, such as logging or login checks, each able to stop the request. In Go it is written `func(http.Handler) http.Handler`, and it acts as a decorator.

Where the book teaches it

Related terms

Chain of responsibilityDecoratorHandler