mirror of
https://github.com/spf13/viper
synced 2025-05-11 06:37:27 +00:00
Update viper.go
This commit is contained in:
parent
13df721090
commit
2bf315e378
1 changed files with 1 additions and 1 deletions
2
viper.go
2
viper.go
|
@ -1649,7 +1649,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(cast.ToString(v.Get(key)))
|
||||
}
|
||||
cfg.WriteTo(f)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue