Versions in this module Expand all Collapse all v0 v0.1.0 Apr 30, 2022 Changes in this version type Template + func ParseFS(tfs TrustedFS, patterns ...string) (*Template, error) + func (t *Template) ParseFS(tfs TrustedFS, patterns ...string) (*Template, error) + type TrustedFS struct + func TrustedFSFromEmbed(fsys embed.FS) TrustedFS + func TrustedFSFromTrustedSource(ts TrustedSource) TrustedFS + func (tf TrustedFS) Sub(dir TrustedSource) (TrustedFS, error) v0.0.2 Jul 6, 2020 v0.0.1 Jun 29, 2020 Changes in this version + func IsTrue(val interface{}) (truth, ok bool) + func MustParseAndExecuteToHTML(text stringConstant) safehtml.HTML + type Error struct + Description string + ErrorCode ErrorCode + Line int + Name string + Node parse.Node + func (e *Error) Error() string + type ErrorCode int + const ErrAmbigContext + const ErrBadHTML + const ErrBranchEnd + const ErrCSPCompatibility + const ErrEndContext + const ErrEscapeAction + const ErrNoSuchTemplate + const ErrOutputContext + const ErrPartialCharset + const ErrPartialEscape + const ErrPredefinedEscaper + const ErrRangeLoopReentry + const ErrSlashAmbig + const ErrUnbalancedJsTemplate + const OK + type FuncMap map[string]interface + type Template struct + Tree *parse.Tree + func Must(t *Template, err error) *Template + func New(name string) *Template + func ParseFiles(filenames ...stringConstant) (*Template, error) + func ParseFilesFromTrustedSources(filenames ...TrustedSource) (*Template, error) + func ParseGlob(pattern stringConstant) (*Template, error) + func ParseGlobFromTrustedSource(pattern TrustedSource) (*Template, error) + func (t *Template) CSPCompatible() *Template + 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 interface{}) error + func (t *Template) ExecuteTemplate(wr io.Writer, name string, data interface{}) error + func (t *Template) ExecuteTemplateToHTML(name string, data interface{}) (safehtml.HTML, error) + func (t *Template) ExecuteToHTML(data interface{}) (safehtml.HTML, 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 stringConstant) (*Template, error) + func (t *Template) ParseFiles(filenames ...stringConstant) (*Template, error) + func (t *Template) ParseFilesFromTrustedSources(filenames ...TrustedSource) (*Template, error) + func (t *Template) ParseFromTrustedTemplate(tmpl TrustedTemplate) (*Template, error) + func (t *Template) ParseGlob(pattern stringConstant) (*Template, error) + func (t *Template) ParseGlobFromTrustedSource(pattern TrustedSource) (*Template, error) + func (t *Template) Templates() []*Template + type TrustedSource struct + func TrustedSourceFromConstant(src stringConstant) TrustedSource + func TrustedSourceFromConstantDir(dir stringConstant, src TrustedSource, filename string) (TrustedSource, error) + func TrustedSourceFromEnvVar(key stringConstant) TrustedSource + func TrustedSourceFromFlag(value flag.Value) TrustedSource + func TrustedSourceJoin(elem ...TrustedSource) TrustedSource + func (t TrustedSource) String() string + type TrustedTemplate struct + func MakeTrustedTemplate(tmpl stringConstant) TrustedTemplate + func (t TrustedTemplate) String() string