Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
// LoadTemplates loads templates from a filesystem
LoadTemplates(fsys fs.FS, pattern string) error
// Execute executes a template with the given data
Execute(templateName string, data interface{}) (string, error)
// ExecuteToFile executes a template and writes to a file
ExecuteToFile(templateName string, data interface{}, outputPath string) error
// AddFunction adds a custom function to the template engine
AddFunction(name string, fn interface{}) error
// ListTemplates returns a list of loaded template names
ListTemplates() []string
}
Engine defines the interface for template processing
Click to show internal directories.
Click to hide internal directories.