package
0.0.0-20240423165716-7ef61953e366
Repository: https://github.com/go-zh/website.git
Documentation: pkg.go.dev
# README
Package tmplfunc provides an extension of Go templates in which templates can be invoked as if they were functions.
See the package documentation for details.
# Functions
Funcs installs functions for all the templates in the set containing t.
MustParse is like Parse but panics on error.
MustParseFiles is like ParseFiles but panics on error.
MustParseGlob is like ParseGlob but panics on error.
Parse is like t.Parse(text), adding functions for the templates defined in text.
ParseFiles is like t.ParseFiles(filenames...), adding functions for the parsed templates.
ParseFS is like ParseFiles or ParseGlob but reads from the file system fs instead of the host operating system's file system.
ParseGlob is like t.ParseGlob(pattern), adding functions for the parsed templates.
# Interfaces
A Template is a *template.Template, where template refers to either the html/template or text/template package.