Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StringTemplate ¶
type StringTemplate struct {
// contains filtered or unexported fields
}
StringTemplate wraps a parsed text template for string output.
func LoadString ¶
func LoadString(path string) (*StringTemplate, error)
LoadString reads a file and parses it into a StringTemplate.
func LoadStringFromFS ¶
func LoadStringFromFS(tmplFS fs.FS, path string) (*StringTemplate, error)
LoadStringFromFS reads a file from an fs.FS into a StringTemplate.
func ParseStringTemplate ¶
func ParseStringTemplate(name, input string) (*StringTemplate, error)
ParseStringTemplate parses a string template with missingkey=error.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template wraps a parsed text template loaded from disk.
func LoadDefault ¶
LoadDefault parses the embedded heartbeat template.
func LoadFromFS ¶
LoadFromFS reads and parses a template from an fs.FS.
Click to show internal directories.
Click to hide internal directories.