templateutil

package
v2.0.0-alpha.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package templateutil provides helpers for evaluating Go text/template snippets against an inventory value, with optional custom delimiters and template options.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL