From 6f70a6aab30e8946b172d8f5b444dbaf4438f791 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Thu, 9 Dec 2021 17:47:43 +0100 Subject: [PATCH] correct config order --- src/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.go b/src/config.go index 9c049a1..06f9896 100644 --- a/src/config.go +++ b/src/config.go @@ -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() }