view

package
v0.0.0-...-b201049 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncMap

type FuncMap map[string]interface{}

FuncMap is a wrapper of map[string]interface{}, it use to pass FuncMap to HTML template render.

type ViewManager

type ViewManager struct {
	*template.Template
	// contains filtered or unexported fields
}

View ViewManager manages html templates.

var Manager *ViewManager

func NewManager

func NewManager(pattern string, funcMap FuncMap) *ViewManager

NewManager creates and returns new view manager instance. ViewManager can only be created once.

func (*ViewManager) SetFuncMap

func (m *ViewManager) SetFuncMap(funcMap FuncMap)

SetFuncMap sets FuncMap for HTML render. It pass funcMap to *template.Template.FuncMap().

Jump to

Keyboard shortcuts

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