Recently I’ve been working on a new Go project, it must be shared across the team, and I wanted to be sure that all of the test passed and have a
golintrun everytime before a commit, just to have that pretty code and follow some standards.
We all use adapters in our daily life, when we want to connect a DVI monitor to a VGA port we need an adapter to do that, or when we want to use a microSD in a SD memory card. So guess what, we can do kind of the same thing using this design pattern.
The Decorator Pattern is a structural design pattern that has the ability to add behaviour to an existing class dynamically.
A design pattern is a reusable solution that can be applied to commonly occurring problems in software development, think them as templates for solving problems.
subscribe via RSS