fix: Config watchConfig (#135)

---
Closes: #135
This commit is contained in:
lejianwen
2025-02-10 10:13:34 +08:00
parent 79a5dd53ae
commit dbf8b23b15
+2 -1
View File
@@ -56,9 +56,10 @@ func Init(rowVal *Config, path string) *viper.Viper {
if err != nil { if err != nil {
panic(fmt.Errorf("Fatal error config file: %s \n", err)) panic(fmt.Errorf("Fatal error config file: %s \n", err))
} }
/*
v.WatchConfig() v.WatchConfig()
/*
//监听配置修改没什么必要 //监听配置修改没什么必要
v.OnConfigChange(func(e fsnotify.Event) { v.OnConfigChange(func(e fsnotify.Event) {
//配置文件修改监听 //配置文件修改监听