package config import "github.com/spf13/viper" // NewViper returns the viper that reads the settings: each setting's // environment variable, bound to its own name. Every setting of discriminator // and rproxy is read through it, and none is read with os.Getenv or // os.LookupEnv outside it. An environment variable that is set but empty is // set, as one that holds a value is, which viper does not take for granted. func NewViper() *viper.Viper { v := viper.New() v.AutomaticEnv() v.AllowEmptyEnv(true) return v }