templates

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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