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

Function SafeWriteConfigAs

viper.go:1653–1653  ·  view source on GitHub ↗

SafeWriteConfigAs writes current configuration to a given filename if it does not exist.

(filename string)

Source from the content-addressed store, hash-verified

1651
1652// SafeWriteConfigAs writes current configuration to a given filename if it does not exist.
1653func SafeWriteConfigAs(filename string) error { return v.SafeWriteConfigAs(filename) }
1654
1655func (v *Viper) SafeWriteConfigAs(filename string) error {
1656 alreadyExists, err := afero.Exists(v.fs, filename)

Callers

nothing calls this directly

Calls 1

SafeWriteConfigAsMethod · 0.80

Tested by

no test coverage detected