Decorator Pattern:
The decorator pattern is a structural design pattern that lets you attach new behaviors to objects by placing these objects inside special wrapper objects that contain the behaviors. With this design, you can add or remove responsibilities from an object dynamically without altering its implementation or affecting other objects. Let's use the example of a character and decorate the character with jackets to increase their warmth. Implementation in Go: In this example, we are able to decorate the character object with additional behavior at runtime without having to modify the character struct or know beforehand how many or which decorations we'll add. This dynamic flexibility is what makes the decorator pattern such a helpful design.