kelseyhightower / envconfig

Golang library for managing configuration data from environment variables
MIT License
5.01k stars 377 forks source link

Don't set default value if struct field is already populated #178

Closed davidterranova closed 4 years ago

davidterranova commented 4 years ago

The goal of this PR is to apply defaults only if the two following conditions are matched :

This change allow envconfig to be integrated with a more general config system that loads the config from a different provider and override values from environment variables if they are defined / with a zero value