template

package
v0.0.2-rc-ci Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(themes []fs.FS, data map[string]any, funcs template.FuncMap) *Engine

func (*Engine) FS

func (t *Engine) FS() fs.FS

func (*Engine) Render

func (t *Engine) Render(ctx context.Context, w io.Writer, templates []string, data map[string]any, funcs template.FuncMap, includeHelper bool) error

Render executes the templates with data and func to the writer. This function can be io and cpu intensive and therefore can abort when the context was canceled.

Jump to

Keyboard shortcuts

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