We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46a61e6 commit a1f26b1Copy full SHA for a1f26b1
viper_test.go
@@ -1742,6 +1742,23 @@ func TestSafeWriteConfigAsWithExistingFile(t *testing.T) {
1742
assert.True(t, ok, "Expected ConfigFileAlreadyExistsError")
1743
}
1744
1745
+func TestWriteHiddenFile(t *testing.T) {
1746
+ v := New()
1747
+ fs := afero.NewMemMapFs()
1748
+ fs.Create("/test/.config")
1749
+ v.SetFs(fs)
1750
+
1751
+ v.SetConfigName(".config")
1752
+ v.SetConfigType("yaml")
1753
+ v.AddConfigPath("/test")
1754
1755
+ err := v.ReadInConfig()
1756
+ require.NoError(t, err)
1757
1758
+ err = v.WriteConfig()
1759
1760
+}
1761
1762
var yamlMergeExampleTgt = []byte(`
1763
hello:
1764
pop: 37890
0 commit comments