MCPcopy
hub / github.com/spf13/viper / WriteConfigAs

Method WriteConfigAs

viper.go:1635–1637  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

1633func WriteConfigAs(filename string) error { return v.WriteConfigAs(filename) }
1634
1635func (v *Viper) WriteConfigAs(filename string) error {
1636 return v.writeConfig(filename, true)
1637}
1638
1639// WriteConfigTo writes current configuration to an [io.Writer].
1640func WriteConfigTo(w io.Writer) error { return v.WriteConfigTo(w) }

Callers 4

TestWriteConfigFunction · 0.80
TestWriteConfigTOMLFunction · 0.80
TestWriteConfigDotEnvFunction · 0.80
WriteConfigAsFunction · 0.80

Calls 1

writeConfigMethod · 0.95

Tested by 3

TestWriteConfigFunction · 0.64
TestWriteConfigTOMLFunction · 0.64
TestWriteConfigDotEnvFunction · 0.64