Documentation ¶
Overview ¶
Package watch contains the watch.Execute function called by the main command line interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(settings *execute.ProcessSettings) <-chan ReturnData
Execute processes all files in the InputPath directory.
It continually watches the directory for relevant changes in its own goroutine, and only processes and updates the necessary files when a change is detected.
Types ¶
type ReturnData ¶
type ReturnData struct { Type ReturnType Files execute.ProcessedFileList //Only on ReturnType=WR_ProcessedDirectory Err error //Only on ReturnType=WR_ProcessedDirectory or WR_ProcessedFile or WR_ErroredOut Message string //Only on ReturnType=WR_Message or WR_ProcessedFile }
ReturnData is the data that is returned through a channel from watch.Execute when it processes files
type ReturnType ¶
type ReturnType int
const ( WR_Message ReturnType = iota //An informative message is being sent WR_ProcessedDirectory //Directory() was called due to initialization or default language update WR_ProcessedFile //A single file was updated. Message contains the filename. Error is filled on error. WR_ErroredOut //The watch could not be started or has closed WR_CloseRequested //Process close was requested )
Click to show internal directories.
Click to hide internal directories.