Documentation
¶
Overview ¶
Package templateutil provides helpers for evaluating Go text/template snippets against an inventory value, with optional custom delimiters and template options.
Index ¶
- func EvaluateTemplateStringToString(templateContent string, inventory any, funcs template.FuncMap) (string, error)
- func EvaluateTemplateStringToStringWithDelimiter(templateContent string, inventory any, funcs template.FuncMap, ...) (string, error)
- func EvaluateTemplateStringToStringWithDelimiterAndOpts(templateContent string, inventory any, funcs template.FuncMap, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvaluateTemplateStringToString ¶
func EvaluateTemplateStringToString( templateContent string, inventory any, funcs template.FuncMap, ) (string, error)
EvaluateTemplateStringToString evaluates templateContent using the default text/template delimiters and no template options.
func EvaluateTemplateStringToStringWithDelimiter ¶
func EvaluateTemplateStringToStringWithDelimiter( templateContent string, inventory any, funcs template.FuncMap, delimLeft, delimRight string, ) (string, error)
EvaluateTemplateStringToStringWithDelimiter evaluates templateContent with custom delimiters and no template options.
func EvaluateTemplateStringToStringWithDelimiterAndOpts ¶
func EvaluateTemplateStringToStringWithDelimiterAndOpts( templateContent string, inventory any, funcs template.FuncMap, delimLeft, delimRight string, templateOptions []string, ) (string, error)
EvaluateTemplateStringToStringWithDelimiterAndOpts evaluates templateContent with custom delimiters and template options applied. See https://pkg.go.dev/text/template#Template.Option for the option set.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.