render

package
v1.0.1003 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PongoHTML

type PongoHTML struct {
	Template *pongo2.Template
	Name     string
	Data     any
}

PongoHTML strcut

func (*PongoHTML) Render

func (this *PongoHTML) Render(w http.ResponseWriter) error

输出

func (*PongoHTML) WriteContentType

func (this *PongoHTML) WriteContentType(w http.ResponseWriter)

WriteContentType for gin interface WriteContentType override

type PongoRender

type PongoRender struct {
	TmplDir string
}

PongoRender struct init

func TemplatePath

func TemplatePath(tmplDir string) *PongoRender

TemplatePath html files path

func (*PongoRender) Instance

func (this *PongoRender) Instance(name string, data any) render.Render

Instance init

Jump to

Keyboard shortcuts

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