package
Version:
v1.9.0
Opens a new window with list of versions in this module.
Published: Aug 14, 2026
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package tmpl provides shared Go template rendering with go:embed support.
-
func FuncMap() template.FuncMap
-
func Render(name, tmplStr string, data any) (string, error)
-
func RenderToFile(name, tmplStr string, data any, outPath string) error
-
func RenderWithPartials(name, tmplStr string, partials map[string]string, data any) (string, error)
FuncMap returns the shared custom template functions available in all templates.
Render renders a template string with the given data and custom functions.
RenderToFile renders a template string and writes the result to a file.
RenderWithPartials renders a template string with named partial templates.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.