template

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncMap

func FuncMap() template.FuncMap

FuncMap returns the default template functions

func GetTemplates

func GetTemplates() *template.Template

GetTemplates returns the current template instance

func LoadTemplates

func LoadTemplates(patterns ...string) error

LoadTemplates loads all templates from the given patterns

func Reload

func Reload(patterns ...string) error

Reload reloads templates from the same patterns (useful in development)

func RenderFull

func RenderFull(w io.Writer, name string, data any) error

RenderFull renders a full page template

func RenderPartial

func RenderPartial(w io.Writer, name string, data any) error

RenderPartial renders a template component (for Ajax partial responses)

func SetTemplates

func SetTemplates(tmpl *template.Template)

SetTemplates allows users to set a custom template instance

Types

This section is empty.

Jump to

Keyboard shortcuts

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