Categorygithub.com/mesuutt/echopongo2
modulepackage
0.0.0-20200316121558-a5c237389e56
Repository: https://github.com/mesuutt/echopongo2.git
Documentation: pkg.go.dev

# README

echo pongo2 renderer

Use pongo2 templates in the echo web framework

Installation

go get github.com/mesuutt/echopongo2

Usage

echopongo2 implements the echo Renderer interface

e := echo.New()
r, err := echopongo2.NewRenderer("./template")
e.Renderer = r

Somewhere in a handler

func Hello(c *echo.Context) error {
    data := map[string]string{"World":"mayowa"}
    return c.Render(http.StatusOK, "hello.html", data)
}

# Functions

NewRenderer creates a new instance of Renderer.

# Structs

Renderer manages a pongo2 TemplateSet.