template

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMapMore = func() template.FuncMap {
	list := template.FuncMap{
		"toString":      ToString,
		"hasPermission": HasPermission,
	}
	return list
}

function map more

Functions

func HasPermission

func HasPermission(feature string) bool

function has parmission to User

func ToString

func ToString(value interface{}) string

TODO

Code: session_gorilla.Values["s_auth_type"] HTML: {{index $.session_gorilla.Values "is_auth_type" | tostring}} ?

Types

type Templates

type Templates struct {
	Templates map[string]*template.Template
}

Templates is a custom html/template renderer for Echo framework

func NewTemplates

func NewTemplates() *Templates

New Templates

func (*Templates) Render

func (t *Templates) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render implement e.Renderer interface

Jump to

Keyboard shortcuts

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