watcher

package
v0.0.0-...-ae21eb4 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher watches a directory for .md file changes and calls onChange.

func New

func New(dir string, onChange func(), debounce time.Duration) *Watcher

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

func (*Watcher) Start

func (w *Watcher) Start() error

Start begins watching. It blocks until Stop is called or an error occurs.

func (*Watcher) Stop

func (w *Watcher) Stop()

Stop signals the watcher to stop.

Jump to

Keyboard shortcuts

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