Konfi-Castle-Kasino/pkg/router/TemplateRender.go
kolaente 4de30c61a0
All checks were successful
continuous-integration/drone/push Build is passing
Fixed lint
2019-09-05 21:35:07 +02:00

18 lines
364 B
Go

package router
import (
"github.com/labstack/echo/v4"
"html/template"
"io"
)
// Template represents a template
type Template struct {
templates *template.Template
}
// Render implements echo's template handler
func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
return t.templates.ExecuteTemplate(w, name, data)
}