render

package
v0.0.0-...-38fbac2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultData

func AddDefaultData(td *models2.TemplateData, r *http.Request) *models2.TemplateData

AddDefaultData to the templateData

func CreateTemplateCache

func CreateTemplateCache() (map[string]*template.Template, error)

CreateTemplateCache creates a template cache as a map

func NewTemplates

func NewTemplates(a *config2.AppConfig)

NewTemplates sets the config for the template package

func RenderTemplate

func RenderTemplate(w http.ResponseWriter, r *http.Request, tmpl string, td *models2.TemplateData)

RenderTemplate renders templates using html/template

Types

This section is empty.

Jump to

Keyboard shortcuts

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