view

package
v0.0.0-...-a333e2e Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

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

Default is shorthands for rendering template. This includes HTTP response writer and HTTP request object for calling helper funcs.

func HTML

func HTML(w http.ResponseWriter, status int, name string, data map[string]interface{}) error

HTML render view

func Init

func Init(funcs template.FuncMap, debug bool)

Types

type CachedTemplateExecutor

type CachedTemplateExecutor struct {
	Template *template.Template
}

func (CachedTemplateExecutor) ExecuteTemplate

func (e CachedTemplateExecutor) ExecuteTemplate(w io.Writer, name string, data interface{}) error

type DebugTemplateExecutor

type DebugTemplateExecutor struct {
	Glob  string
	Funcs template.FuncMap
}

func (DebugTemplateExecutor) ExecuteTemplate

func (e DebugTemplateExecutor) ExecuteTemplate(w io.Writer, name string, data interface{}) error

type TemplateExecutor

type TemplateExecutor interface {
	ExecuteTemplate(w io.Writer, name string, data interface{}) error
}

Jump to

Keyboard shortcuts

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