kelseyhightower / envconfig

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

Skip defaults on non zero values #179

Open davidterranova opened 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

draev commented 3 years ago

Up! It's a useful fix!