diff --git a/viper.go b/viper.go index c33fb62..06610fc 100644 --- a/viper.go +++ b/viper.go @@ -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 }