sjet

package module
v1.231122.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

README

jet

custom jet for golang

add more fn and web fn for render page

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 RenderHTMLTemplateWithReplaceMap

func RenderHTMLTemplateWithReplaceMap(eng *engine.TemplateEngine, c *gin.Context, replaceMap map[string]string)

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
util

Jump to

Keyboard shortcuts

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