templ

package
v0.0.0-...-f8e9dc7 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

type Extension struct {
	// contains filtered or unexported fields
}

func (*Extension) Execute

func (e *Extension) Execute(wr io.Writer, data any) error

func (*Extension) ExecuteTemplate

func (e *Extension) ExecuteTemplate(wr io.Writer, name string, data any) error

func (*Extension) Extend

func (e *Extension) Extend(files ...string) *Extension

func (*Extension) Template

func (e *Extension) Template() *template.Template

type Template

type Template struct {
	BasePath string
	// e.g. os.DirFS(".") or from embed.FS
	FS        fs.FS
	Funcs     template.FuncMap
	HotReload bool
}

func (*Template) Compile

func (t *Template) Compile(files ...string) *Extension

func (*Template) Parse

func (t *Template) Parse(files ...string) *template.Template

func (*Template) ParseFunc

func (t *Template) ParseFunc(files ...string) func() *template.Template

Jump to

Keyboard shortcuts

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