Start begins watching for progress.md changes.
()
| 113 | |
| 114 | // Start begins watching for progress.md changes. |
| 115 | func (w *ProgressWatcher) Start() error { |
| 116 | w.mu.Lock() |
| 117 | if w.running { |
| 118 | w.mu.Unlock() |
| 119 | return nil |
| 120 | } |
| 121 | w.running = true |
| 122 | w.mu.Unlock() |
| 123 | |
| 124 | // Watch the directory so we catch creates and writes |
| 125 | if err := w.watcher.Add(w.dir); err != nil { |
| 126 | return err |
| 127 | } |
| 128 | |
| 129 | go w.processEvents() |
| 130 | return nil |
| 131 | } |
| 132 | |
| 133 | // Stop stops watching. |
| 134 | func (w *ProgressWatcher) Stop() { |
nothing calls this directly
no test coverage detected