Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Knit ¶
type Knit interface { ProcessText(text string) (string, error) ProcessFile(filepath string) ProcessResult ProcessFiles(filepaths []string, fn OnFileProcessed) }
type OnFileProcessed ¶
type OnFileProcessed = func(res ProcessResult)
OnFileProcessed is a callback function used to notify callers when knit is done processing a file.
type ProcessResult ¶
type ProcessResult struct { // The file that was processed File string // Was the file modified during processing Modified bool // An error, if any, that occured during processing Error error // How long it took to process the file Time time.Duration }
ProcessResult represents a file that has been processed by knit
Click to show internal directories.
Click to hide internal directories.