update viper.go

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
Mark Sagi-Kazar 2023-01-19 16:31:34 +01:00
parent 6c4d359745
commit fefe35c98f
No known key found for this signature in database
GPG key ID: 31AB0439F4C5C90E

View file

@ -423,6 +423,8 @@ var SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore"}
// OnConfigChange sets the event handler that is called when a config file changes.
func OnConfigChange(run func(in fsnotify.Event)) { v.OnConfigChange(run) }
// OnConfigChange sets the event handler that is called when a config file changes.
func (v *Viper) OnConfigChange(run func(in fsnotify.Event)) {
v.onConfigChange = run
}