correct config order
This commit is contained in:
parent
14deeca57a
commit
6f70a6aab3
@ -18,10 +18,10 @@ func init() {
|
||||
if err != nil { // Handle errors reading the config file
|
||||
syslog.Err(fmt.Sprintf("Can't read config file: %s \n", err.Error()))
|
||||
}
|
||||
viper.WatchConfig()
|
||||
viper.OnConfigChange(func(e fsnotify.Event) {
|
||||
//The Viper configuration has changed to perform the responding operation
|
||||
fmt.Println("Config file changed:", e.Name)
|
||||
events.FireEvent("config_changed")
|
||||
})
|
||||
viper.WatchConfig()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user