template

package
v0.0.0-...-c6b82f2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

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

func NewEngine

func NewEngine() Engine

NewEngine creates a new template engine

Jump to

Keyboard shortcuts

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