templating

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncMapWithOptions added in v0.0.5

func FuncMapWithOptions(options map[string]string) template.FuncMap

FuncMapWithOptions returns the base function map plus an "option" function that looks up keys in the provided options map.

func Render

func Render(templateFS fs.FS, entrypoint string, data any) ([]byte, error)

Render renders a template from an fs.FS, supporting partials via ParseFS.

func RenderString

func RenderString(name string, content string, data any) ([]byte, error)

RenderString renders a single template string.

func RenderStringWithOptions added in v0.0.5

func RenderStringWithOptions(name string, content string, data any, options map[string]string) ([]byte, error)

RenderStringWithOptions renders a single template string with template options available via the option function.

func RenderWithOptions added in v0.0.5

func RenderWithOptions(templateFS fs.FS, entrypoint string, data any, options map[string]string) ([]byte, error)

RenderWithOptions renders a template from an fs.FS with template options available via the option function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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