Feat: Gathering all configs to one place
Closed this issue · 0 comments
logicalangel commented
We should free all codes from getting and checking configs. all these configs should go in one place.
So we should:
-
Use a library to get configs from envs and yaml files, which I recommend:
"github.com/ilyakaznacheev/cleanenv" -
Use go validator to check the correctness of configs, using annotations.
-
Provide them using a singleton or a public struct value
-
Refactor current codes to use this solution.