Skip to content

Glossary: Software Design Patterns in Go

Decorator

Also written: decorators, decorator pattern

A wrapper with the same interface as the object it wraps; it does a little extra work (such as logging) and passes the call on. Because the interface is unchanged, decorators can stack.

Where the book teaches it

Related terms

ProxyAdapterWrapper