Allow the key delimiter to be set on viper objects.

This commit is contained in:
Mark Fine 2023-07-05 13:00:23 -07:00
parent 097e0d888f
commit bb70192ffe

View file

@ -1478,6 +1478,14 @@ func (v *Viper) SetEnvKeyReplacer(r *strings.Replacer) {
v.envKeyReplacer = r
}
// SetKeyDelim sets the delimiter used for determining key parts on the viper
// object.
func SetKeyDelim(d string) { v.SetKeyDelim(d) }
func (v *Viper) SetKeyDelim(d string) {
v.keyDelim = d
}
// RegisterAlias creates an alias that provides another accessor for the same key.
// This enables one to change a name without breaking the application.
func RegisterAlias(alias string, key string) { v.RegisterAlias(alias, key) }