Added setters for key delimiter

This commit is contained in:
Chris Wright 2019-03-13 10:37:26 +00:00 committed by GitHub
parent 9e56dacc08
commit d80ace340d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1765,6 +1765,12 @@ func (v *Viper) SetConfigType(in string) {
}
}
// SetKeyDelim set the delimiter string used to separate key values
// returned by AllKeys(). This is useful if you need to allow for
// the '.' character in key names.
func SetKeyDelim(delim string) { v.keyDelim = delim }
func (v *Viper) SetKeyDelim(delim string) { v.keyDelim = delim }
func (v *Viper) getConfigType() string {
if v.configType != "" {
return v.configType