fix INI saving panics (#1075)

This commit is contained in:
r-stepanenko
2021-03-10 14:46:19 +01:00
committed by GitHub
parent 3c7b44f0bc
commit fb4eafdd97
+1 -1
View File
@@ -1743,7 +1743,7 @@ func (v *Viper) marshalWriter(f afero.File, configType string) error {
if sectionName == "default" {
sectionName = ""
}
cfg.Section(sectionName).Key(keyName).SetValue(v.Get(key).(string))
cfg.Section(sectionName).Key(keyName).SetValue(v.GetString(key))
}
cfg.WriteTo(f)
}