Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileWatcher ¶
func FileWatcher() (chan struct{}, chan string)
FileWatcher returns two channels: one for file system events and one for extra files to watch.
The first channel emits a struct{}{} whenever a file is modified. The caller can use this channel to trigger a slide rebuild.
The second channel is used to add extra files to watch. The caller can use this channel to add extra files to the watcher. The extra files are added to the watcher only if they are not already being watched.
The function returns two channels, but also starts a goroutine that listens for events on the watcher. The goroutine is not stopped until the channel is closed.
The function is not safe for concurrent use. It is the caller's responsibility to ensure that the function is not called concurrently.
Types ¶
This section is empty.