sjet

package module
v1.1.30 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

README

jet

custom jet

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWithFile

func CreateWithFile(dir string) *engine.TemplateEngine

创建文件路径的模板引擎

func CreateWithMem

func CreateWithMem() *engine.TemplateEngine

创建内存存储的模板引擎

func RegCustomFunc

func RegCustomFunc(funcName string, v CustomFunc)

注册自定义的函数

func RenderHTMLTemplate

func RenderHTMLTemplate(eng *engine.TemplateEngine, c *gin.Context)

func RenderMemTemplate

func RenderMemTemplate(eng *engine.TemplateEngine, templateContext *context.TemplateContext, c *gin.Context, fnName string, fnTemplate string) (string, error)

Types

type CustomFunc

type CustomFunc func(c *gin.Context) jet.Func

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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