Documentation ¶ Overview ¶ Package watcher watches a directory for changes and triggers reloads on a debounce. Index ¶ func Watch(ctx context.Context, dir string, onChange func()) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Watch ¶ func Watch(ctx context.Context, dir string, onChange func()) error Watch starts a goroutine that calls onChange whenever a file in dir is created, modified, removed, or renamed. Events are debounced over a short window so that editor "save" patterns (write + chmod + ...) trigger a single reload. Types ¶ This section is empty. Source Files ¶ View all Source files watcher.go Click to show internal directories. Click to hide internal directories.