From fefe35c98fda9ff00f2ebc7f96be5c91e01ebabb Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Thu, 19 Jan 2023 16:31:34 +0100 Subject: [PATCH] update viper.go Signed-off-by: Mark Sagi-Kazar --- viper.go | 2 ++ 1 file changed, 2 insertions(+) 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 }