1
0
Fork 0
mirror of https://github.com/spf13/viper synced 2025-01-13 14:06:38 +00:00

Add a note in the README.md for usage of CancelWatchConfig()

This commit is contained in:
Daniel Einspanjer 2018-07-25 09:34:48 -04:00
parent 981de21183
commit bab97b4ec3

View file

@ -123,6 +123,9 @@ viper.OnConfigChange(func(e fsnotify.Event) {
})
```
If you wish to stop watching the configPaths, simply call viper.CancelWatchConfig().
Note: This might be necessary if your tests involve trying out various config files.
### Reading Config from io.Reader
Viper predefines many configuration sources such as files, environment