template

package
v0.0.0-...-4d10510 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Renderer = &TplRenderer{tmpls: template.New("")}

Functions

func Get

func Get(name string) *template.Template

Get returns a template requested either from the tmplPath (in LiveMode) or from the pre-compiled tmpl list set directly to Renderer.

func Init

func Init(s *settings.Settings, tmpls fs.FS)

Init saves settings and embedded templates to package-level state and also "initialises" template rendering.

Types

type TplRenderer

type TplRenderer struct {
	// contains filtered or unexported fields
}

func (*TplRenderer) Render

func (t *TplRenderer) Render(w io.Writer, name string, data any, c echo.Context) error

Jump to

Keyboard shortcuts

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