Kaynağa Gözat

feat:xiugai

wangchuanjin 3 ay önce
ebeveyn
işleme
55313ddb8f
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      main.go

+ 1 - 1
main.go

@@ -25,7 +25,7 @@ func main() {
 	ossService.LoadOSSAccounts()
 	// 注册一个回调函数,当配置发生变更时会被调用
 	gfsnotify.Add("./config.json", func(event *gfsnotify.Event) {
-		if event.IsWrite() || event.IsChmod() {
+		if event.IsWrite() || event.IsChmod() || event.IsRename() {
 			log.Println("配置文件有变化,更新内存。。。")
 			ossService.LoadOSSAccounts()
 		}