refactor: extract common logic for env feature flags
What does this MR do?
We often use the same logic for feature flags defined in the environment variable. I want to unify this logic and have all the feature flag defined in the same place.
This is the just a first iteration, we can improve on it later.
TODO
-
I added the Changelog
trailer (e.g.Changelog: feature
) to the commits that need to be included in the changelog -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines
Edited by Vladimir Shushlin