watcher

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package watcher watches a directory for changes and triggers reloads on a debounce.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL