template

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEngine

type DefaultEngine struct {
}

DefaultEngine implements the Engine interface

func (*DefaultEngine) RenderFile

func (e *DefaultEngine) RenderFile(filePath string, data map[string]string) (string, error)

RenderFile renders a template file with the provided data

func (*DefaultEngine) RenderString

func (e *DefaultEngine) RenderString(templateContent string, data map[string]string) (string, error)

RenderString renders a template string with the provided data

type Engine

type Engine interface {
	RenderString(templateContent string, data map[string]string) (string, error)
	RenderFile(filePath string, data map[string]string) (string, error)
}

Engine provides template rendering functionality

func NewEngine

func NewEngine() Engine

NewEngine creates a new default template engine

Jump to

Keyboard shortcuts

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