mirror of https://github.com/spf13/viper.git
fix INI saving panics (#1075)
This commit is contained in:
parent
3c7b44f0bc
commit
fb4eafdd97
2
viper.go
2
viper.go
|
@ -1743,7 +1743,7 @@ func (v *Viper) marshalWriter(f afero.File, configType string) error {
|
||||||
if sectionName == "default" {
|
if sectionName == "default" {
|
||||||
sectionName = ""
|
sectionName = ""
|
||||||
}
|
}
|
||||||
cfg.Section(sectionName).Key(keyName).SetValue(v.Get(key).(string))
|
cfg.Section(sectionName).Key(keyName).SetValue(v.GetString(key))
|
||||||
}
|
}
|
||||||
cfg.WriteTo(f)
|
cfg.WriteTo(f)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue