gotemplate

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorOnMissingKey is the option that configures template to exit on missing values.
	ErrorOnMissingKey = "missingkey=error"
	// HelperFileName is the base file name that is not considered a template, but provides additional template definitions.
	HelperFileName = "_helpers.tpl"
)

Variables

This section is empty.

Functions

func GoTemplateFuncMap

func GoTemplateFuncMap() template.FuncMap

Types

type GoTemplateEngine

type GoTemplateEngine struct {
	RootDir domain.Path
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine() *GoTemplateEngine

func (*GoTemplateEngine) Execute

func (e *GoTemplateEngine) Execute(template *domain.Template, values domain.Values) (domain.RenderResult, error)

func (*GoTemplateEngine) ExecuteString

func (e *GoTemplateEngine) ExecuteString(templateString string, values domain.Values) (domain.RenderResult, error)

type GoTemplateInstrumentation

type GoTemplateInstrumentation struct {
}

type GoTemplateStore

type GoTemplateStore struct {
	RootDir string
}

func NewTemplateStore

func NewTemplateStore() *GoTemplateStore

func (*GoTemplateStore) FetchTemplates

func (s *GoTemplateStore) FetchTemplates() ([]*domain.Template, error)

Jump to

Keyboard shortcuts

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