WithWatcher sets the file watcher implementation to use. By default a noop watcher is used. This can be used in tests to modify the watcher behavior or to use an actual file watcher (e.g. fsnotify).
(w watcher.Watcher)
| 271 | // noop watcher is used. This can be used in tests to modify the watcher |
| 272 | // behavior or to use an actual file watcher (e.g. fsnotify). |
| 273 | func WithWatcher(w watcher.Watcher) Option { |
| 274 | return func(api *API) { |
| 275 | api.watcher = w |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | // WithFileSystem sets the file system used for discovering projects. |
| 280 | func WithFileSystem(fileSystem afero.Fs) Option { |
no outgoing calls