pongo2echo

package module
v0.0.0-...-ce7453b Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 6 Imported by: 0

README

pongo2echo

pongo2 template engine for echo (using embed.FS)

see example

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoader

func NewLoader(prefix string, fs *embed.FS) pongo2.TemplateLoader

func NewRenderer

func NewRenderer(prefix string, fs *embed.FS) echo.Renderer

Types

type Loader

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

func (*Loader) Abs

func (l *Loader) Abs(_, name string) string

func (*Loader) Get

func (l *Loader) Get(path string) (io.Reader, error)

type Renderer

type Renderer struct {
	TemplateSet *pongo2.TemplateSet
	// contains filtered or unexported fields
}

Renderer : Custom Renderer for templates

func (Renderer) Render

func (r Renderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render : Custom renderer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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