Documentation
¶
Overview ¶
Package tmpl executes operator-facing templates with Jet (CloudyKit). HTML email bodies stay on html/template for auto-escaping.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
Execute parses body as Jet and renders it against data. HTML escaping is off so CLI and Icinga DSL are copied verbatim. Missing struct fields error; missing map keys render empty (use isset).
func StringErrFunc ¶
StringErrFunc wraps func(string) (string, error) as a Jet function.
Types ¶
type Options ¶
type Options struct {
// Name is the template path used in error messages.
Name string
// Block, if set, imports the body and yields that named block only.
Block string
// Macros are named snippets available to {{ include "name" }} and include("name").
Macros map[string]string
// Funcs are extra globals (Go funcs or jet.Func).
Funcs map[string]any
}
Options control a single Execute.
Click to show internal directories.
Click to hide internal directories.