Versions in this module Expand all Collapse all v1 v1.0.0 Dec 20, 2022 Changes in this version + const DataContextKey + const HasLockContextKey + var GoFuncs = builtinFuncs() + func HTMLEscape(w io.Writer, b []byte) + func HTMLEscapeString(s string) string + func HTMLEscaper(args ...any) string + func IsTrue(val any) (truth, ok bool) + func JSEscape(w io.Writer, b []byte) + func JSEscapeString(s string) string + func JSEscaper(args ...any) string + func URLQueryEscaper(args ...any) string + type ExecError struct + Err error + Name string + func (e ExecError) Error() string + func (e ExecError) Unwrap() error + type ExecHelper interface + GetFunc func(ctx context.Context, tmpl Preparer, name string) (reflect.Value, reflect.Value, bool) + GetMapValue func(ctx context.Context, tmpl Preparer, receiver, key reflect.Value) (reflect.Value, bool) + GetMethod func(ctx context.Context, tmpl Preparer, receiver reflect.Value, name string) (method reflect.Value, firstArg reflect.Value) + Init func(ctx context.Context, tmpl Preparer) + type Executer interface + ExecuteWithContext func(ctx context.Context, p Preparer, wr io.Writer, data any) error + func NewExecuter(helper ExecHelper) Executer + type FuncMap map[string]any + type Preparer interface + Prepare func() (*Template, error) + type Template struct + func Must(t *Template, err error) *Template + func New(name string) *Template + func ParseFS(fsys fs.FS, patterns ...string) (*Template, error) + func ParseFiles(filenames ...string) (*Template, error) + func ParseGlob(pattern string) (*Template, error) + func (t *Template) AddParseTree(name string, tree *parse.Tree) (*Template, error) + func (t *Template) Clone() (*Template, error) + func (t *Template) DefinedTemplates() string + func (t *Template) Delims(left, right string) *Template + func (t *Template) Execute(wr io.Writer, data any) error + func (t *Template) ExecuteTemplate(wr io.Writer, name string, data any) error + func (t *Template) Funcs(funcMap FuncMap) *Template + func (t *Template) Lookup(name string) *Template + func (t *Template) Name() string + func (t *Template) New(name string) *Template + func (t *Template) Option(opt ...string) *Template + func (t *Template) Parse(text string) (*Template, error) + func (t *Template) ParseFS(fsys fs.FS, patterns ...string) (*Template, error) + func (t *Template) ParseFiles(filenames ...string) (*Template, error) + func (t *Template) ParseGlob(pattern string) (*Template, error) + func (t *Template) Prepare() (*Template, error) + func (t *Template) Templates() []*Template