ReloadConfigIfChanged runs the same config reload path used by filesystem events.
()
| 42 | |
| 43 | // ReloadConfigIfChanged runs the same config reload path used by filesystem events. |
| 44 | func (w *Watcher) ReloadConfigIfChanged() { |
| 45 | if w == nil { |
| 46 | return |
| 47 | } |
| 48 | w.reloadConfigIfChanged() |
| 49 | } |
| 50 | |
| 51 | func (w *Watcher) reloadConfigIfChanged() { |
| 52 | data, err := os.ReadFile(w.configPath) |
no test coverage detected