mirror of
https://github.com/spf13/viper
synced 2025-05-11 06:37:27 +00:00
fix INI saving panics
This commit is contained in:
parent
d10c856f6c
commit
535b784f8a
1 changed files with 1 additions and 1 deletions
2
viper.go
2
viper.go
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue