templates

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileAllTemplates

func CompileAllTemplates(templates map[string]config.Template) (map[string]*Template, error)

func CompileTemplates

func CompileTemplates(templates map[string]config.Template, namePrefix string) (map[string]*Template, error)

func ExtractDependencies

func ExtractDependencies(rootNode *parse.ListNode, templateNames []string) []string

func ExtractVariables

func ExtractVariables(rootNode *parse.ListNode, prefix string) (result []string)

func GetCompiledTemplate

func GetCompiledTemplate(templateData string, templateName string) (*template.Template, error)

func Md5

func Md5(input string) string

func RegisterTemplateFuncs

func RegisterTemplateFuncs(funcs template.FuncMap)

Types

type Template

type Template struct {
	CompiledTemplate *template.Template
	Dependencies     []*Template
	Name             string
}

func GetDependencyStackForMultipleTemplates

func GetDependencyStackForMultipleTemplates(templateNames []string, templates map[string]*Template) ([]*Template, error)

func GetOrderedTemplates

func GetOrderedTemplates(templates map[string]*Template) ([]*Template, error)

Jump to

Keyboard shortcuts

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