templates

package
v0.0.0-...-b84af7b Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalFuncs = template.FuncMap{
	"trust": func(html string) template.HTML {
		return template.HTML(html)
	},
	"nl2br": func(html template.HTML) template.HTML {
		return template.HTML(strings.Replace(string(html), "\n", "<br />", -1))
	},
}
View Source
var Templates *template.Template

Functions

func Boot

func Boot()

func Execute

func Execute(name string, data interface{}) (*bytes.Buffer, error)

func ExecuteTemplate

func ExecuteTemplate(name string, data interface{}) (buf *bytes.Buffer, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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