ttpl

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Use

func Use(r *gin.Engine, pathes []string, dotPath string, funcMap ...template.FuncMap)

Use ttpl render

Types

type PageRender

type PageRender struct {
	Template *template.Template

	Data interface{}
	Name string
	// contains filtered or unexported fields
}

PageRender struct for gin

func (PageRender) Render

func (r PageRender) Render(w http.ResponseWriter) error

func (PageRender) WriteContentType

func (r PageRender) WriteContentType(w http.ResponseWriter)

type PageTemplate

type PageTemplate struct {
	TemplatePath string
	// contains filtered or unexported fields
}

PageTemplate struct for gin

func (PageTemplate) Instance

func (r PageTemplate) Instance(name string, data interface{}) render.Render

Jump to

Keyboard shortcuts

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