MCPcopy Create free account
hub / github.com/driangle/taskmd / New

Function New

apps/cli/internal/watcher/watcher.go:24–31  ·  view source on GitHub ↗

New creates a Watcher that monitors dir for markdown file changes.

(dir string, onChange func(), debounce time.Duration)

Source from the content-addressed store, hash-verified

22
23// New creates a Watcher that monitors dir for markdown file changes.
24func New(dir string, onChange func(), debounce time.Duration) *Watcher {
25 return &Watcher{
26 dir: dir,
27 onChange: onChange,
28 debounce: debounce,
29 done: make(chan struct{}),
30 }
31}
32
33// Start begins watching. It blocks until Stop is called or an error occurs.
34//

Callers 4

TestWatcher_DebouncesFunction · 0.85
TestWatcher_StopFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestWatcher_DebouncesFunction · 0.68
TestWatcher_StopFunction · 0.68