engine

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package engine provides template rendering functionality and interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Render(template string, context map[string]interface{}) (string, error)
	RenderFile(filepath string, context map[string]interface{}) (string, error)
}

Engine defines the interface for template engines

type Pongo2Engine

type Pongo2Engine struct{}

Pongo2Engine implements Engine using Pongo2

func NewPongo2Engine

func NewPongo2Engine() *Pongo2Engine

NewPongo2Engine creates a new Pongo2 templating engine

func (*Pongo2Engine) Render

func (e *Pongo2Engine) Render(template string, context map[string]interface{}) (string, error)

Render renders a template string with the given context

func (*Pongo2Engine) RenderFile

func (e *Pongo2Engine) RenderFile(filepath string, context map[string]interface{}) (string, error)

RenderFile renders a template file with the given context

Jump to

Keyboard shortcuts

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