diff options
Diffstat (limited to 'internal/config/state.go')
-rw-r--r-- | internal/config/state.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/config/state.go b/internal/config/state.go index 1364fb84e..17fd31e2a 100644 --- a/internal/config/state.go +++ b/internal/config/state.go @@ -133,6 +133,12 @@ func (st *ConfigState) reloadFromViper() { if err := st.viper.Unmarshal(&st.config, func(c *mapstructure.DecoderConfig) { c.TagName = "name" c.ZeroFields = true // empty the config struct before we marshal values into it + + oldhook := c.DecodeHook + c.DecodeHook = mapstructure.ComposeDecodeHookFunc( + mapstructure.TextUnmarshallerHookFunc(), + oldhook, + ) }); err != nil { panic(err) } |