Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TemplateDirectory ¶
TemplateDirectory renders a given source template using props as variables into a given destination. Destination must not exist. Calling this function is the same as calling TemplateDirectoryOpts without options.
func TemplateDirectoryOpts ¶ added in v0.2.6
TemplateDirectoryOpts renders a given source template into a given destination using props as variables and an optional Options structure. Destination must not exist.
Types ¶
type AfterRenderCallback ¶ added in v0.2.6
AfterRenderCallback defines a callback function to be called whenever a new file has been rendered and is about to be written to disk. This function can perform any kind of modification to `contents`, and return those modifications, which will then be written to disk. Info contains a os.FileInfo structure representing the source template, while contents contains the rendered template.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
NewExecutor returns a new Executor using provided props.Pairs
type Options ¶ added in v0.2.6
type Options struct {
AfterRenderCallback AfterRenderCallback
}