Do you have a variable flag which depending of the configuration the flag will enable/disable (toggle) to execute some lines of code of a feature.? are you tired of this approach?
This patterns was known as “Feature Toggle” which is a set of patterns which can help a team to deliver new functionality to users rapidly but safely.
“Feature Toggling” could be done with t just a variable flag but there are other better way to do it but of course it will require more time to implement it.
Working with toggle feature it will help in:
- Adopt new technologies as part of feature toggles
- Clean Code (if don’t use just simple variable flags)
- Reduce Risk branch merges issues “feature branch”
- other more things!

Image source from this great “Feature toggling” article
“Feature Toggling” could be used when
