|
@@ -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()
|
|
|
}
|