Documentation ¶
Overview ¶
Package runner3 handles building and running the binary when a file has been modified.
How watching/building/running works:
- The directory tree starting at the root working directory is walked (recursively).
- If the directory is not ignored, per the config file settings, an fsnotify watcher is set on each directory to watch for changes to files within that directory.
- When a file change event occurs, the file is checked to see if it has a watched extension. If yes, the binary is rebuilt and/or rerun as needed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure() (err error)
Configure handles some initialization steps before watching for file changes and handling building and running the binary.
func Watch ¶
func Watch() (err error)
Watch handles setting up the watcher of file changes. The watcher is populated with a list of directories to watch, not individual files. Some directories are ignored per the config file field DirectoriesToIgnore.
When a file change event occurs, the event is sent on the eventsChan which will be recevied in start() and is used to trigger the binary being built via build().
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.