tpl

package
v0.0.0-...-e954c25 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name, path string)

Register template by a name Placeholder {{lang}} will be replaced by config lang value

func RegisterDefaultData

func RegisterDefaultData(data map[string]interface{})

func RegisterMulti

func RegisterMulti(baseDir string, names map[string]string)

func Render

func Render(w http.ResponseWriter, r *http.Request, name string, data ...map[string]interface{})

func RenderHandler

func RenderHandler(name string, data ...map[string]interface{}) func(http.ResponseWriter, *http.Request)

HTTP handler to use in URL router directly

Types

type D

type D map[string]interface{}

Jump to

Keyboard shortcuts

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