tmpl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteHTMLTemplate

func ExecuteHTMLTemplate(tmpl string, data interface{}) (result string, err error)

ExecuteHTMLTemplate a helper which quickly execute html template with data

func ExecuteTextTemplate

func ExecuteTextTemplate(tmpl string, data interface{}) (result string, err error)

ExecuteTextTemplate a helper which quickly execute text template with data

Types

type FuncMap

type FuncMap map[string]interface{}

FuncMap a common template tmpl implement

func GetFuncMap

func GetFuncMap() FuncMap

GetFuncMap returns the common funcMap

func (FuncMap) HTMLFuncMap

func (fm FuncMap) HTMLFuncMap() htmlTemplate.FuncMap

HTMLFuncMap convert to html template funcMap

func (FuncMap) TextFuncMap

func (fm FuncMap) TextFuncMap() textTemplate.FuncMap

TextFuncMap convert to text template funcMap

Jump to

Keyboard shortcuts

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