template

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSupportedVariables

func GetSupportedVariables(templateString string) ([]string, error)

Return the variables that the template string expects.

func MultiplexAndExecute

func MultiplexAndExecute(templateString string, input map[string]interface{}) ([]string, error)

- templateString: the input string of the template to execute. - inventory: the inventory map of the variable data structure to apply the template to. The key of the map is the name of the variable, that should match related annotation in the template. Each map item is a slice where in each slice item is a single variable value.

The result is multiple templates from a single template string and multiple arbitrary variable values. func MultiplexAndExecute(templateString string, inventory map[string][]interface{}) ([]string, error) {

Types

type TemplatePart

type TemplatePart struct {
	matrix.Column
	TemplateString  string
	MatchedVariable string
	Template        *t.Template
}

Jump to

Keyboard shortcuts

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