(fileName string)
| 159 | var validFileRe = regexp.MustCompile(`^[a-zA-Z0-9_@.-]+\.json$`) |
| 160 | |
| 161 | func isValidSubSettingsFileName(fileName string) bool { |
| 162 | if filepath.Ext(fileName) != ".json" { |
| 163 | return false |
| 164 | } |
| 165 | baseName := filepath.Base(fileName) |
| 166 | return validFileRe.MatchString(baseName) |
| 167 | } |
| 168 | |
| 169 | func (w *Watcher) handleSettingsFileEvent(_ fsnotify.Event, _ string) { |
| 170 | fullConfig := ReadFullConfig() |