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: ? 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

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