internal

package
v0.0.0-...-1af004e Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TraceEnabled bool
	Ran          Trace
)
View Source
var Templates = new(LockedTpl)

Functions

This section is empty.

Types

type LockedTpl

type LockedTpl struct {
	sync.Mutex
	// contains filtered or unexported fields
}

LockedTpl adds a lock to template.Template for reloading in dev without race conditions.

func (*LockedTpl) ExecuteTemplate

func (t *LockedTpl) ExecuteTemplate(wr io.Writer, name string, data interface{}) error

func (*LockedTpl) Has

func (t *LockedTpl) Has(name string) bool

func (*LockedTpl) List

func (t *LockedTpl) List() []string

func (*LockedTpl) Set

func (t *LockedTpl) Set(html *htmlTemplate.Template, text *textTemplate.Template)

type Template

type Template interface {
	ExecuteTemplate(io.Writer, string, interface{}) error
	Lookup(string) Template
	GetTree(string) *parse.Tree
	TemplateNames() []string
}

type Trace

type Trace map[string][]interface{}

func (Trace) Names

func (t Trace) Names() []string

Jump to

Keyboard shortcuts

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