Documentation ¶
Overview ¶
Package htmltemplate provides an HTML renderer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRender ¶
MustRender is like Render, but panics if an error occurs.
Types ¶
type Engine ¶
type Engine interface { // ParseFS loads templates from the given fs. ParseFS(f fs.FS) error // Execute evaluates template with given name and the data context. Execute(w io.Writer, name string, data any) error }
Engine is an adapter for a templating engine that is used by a Renderer.
func NewEngine ¶
func NewEngine(config *EngineConfig) Engine
NewEngine creates a a new Engine backed by template/html.
type EngineConfig ¶
Click to show internal directories.
Click to hide internal directories.