From d80ace340d0e4978bde2ad30e5832311c31dc1bb Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Wed, 13 Mar 2019 10:37:26 +0000 Subject: [PATCH] Added setters for key delimiter --- viper.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/viper.go b/viper.go index 7173c6e..fb25529 100644 --- a/viper.go +++ b/viper.go @@ -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