design

package
v5.0.0-...-03972fd Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncMap

func FuncMap() template.FuncMap

Produce the function map.

Use this to pass the functions into the template engine:

tpl := template.New("foo").Funcs(sprig.FuncMap()))

Types

type Designer

type Designer interface {
	// Parse templates (with relative paths or aliases, starts with "@")
	Compile(files ...string) Template
	// Create new child designer.
	// Method create new Designer with related path.
	// Method extends set of funcs and views.
	Extends(funcs template.FuncMap, path string, views ...string) Designer
	// Get application
	Echo() *echo.Echo
}

func NewDesigner

func NewDesigner(
	e *echo.Echo,
	funcs template.FuncMap,
	path string,
	layouts string,
	files ...string,
) Designer

type Template

type Template interface {
	Execute(wr io.Writer, data interface{}) error
}

Jump to

Keyboard shortcuts

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