Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalBoolExpression ¶
EvalBoolExpression determines whether given go template expression evaluates to true or false
func EvalTemplate ¶
EvalTemplate interpolates given template text into a final output string
Types ¶
type Context ¶
type Context interface { // GetEvalVars returns a dictionary of the project's variable names mapped to // their corresponding values for evaluation purposes. It does not include the // process' env var. GetEvalVars() map[string]interface{} // GetPlaceholders returns a map of special placeholders that can be used instead // of go template expressions, for more lightweight templating, especially for the // project's name, which appears everywhere. GetPlaceholders() map[string]string // GetShellVars returns all env vars to be used when invoking shell commands, // including the current process' env vars, the project's vars and an augmented // PATH var including extra bin dirs. GetShellVars(includeProcessVars bool) []string }
Context encapsulates everything required for template evaluation and rendering
type RenderMode ¶
type RenderMode int
RenderMode determines how/if rendering enabled/disabled state should change for an item and all its children recursively, compared to parent's state
const ( // DefaultRendering preserves current rendering mode of parent DefaultMode RenderMode = iota // TemplateRendering enables template rendering for itself and all children recursively TemplateMode // CopyRendering disables template rendering for itself and all children recursively CopyMode // InsertRendering enables template insertion, but only for a single file InsertMode )
Click to show internal directories.
Click to hide internal directories.