Standard library / text/template/parse
text/template/parse.SkipFuncCheck
Allows syntax parsing of undefined function identifiers; does not make them executable. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
const SkipFuncCheck ModeWorking Example
Example Snippetgo
package main
import ( "fmt" "text/template/parse")
func main() { t := parse.New("demo") t.Mode = parse.SkipFuncCheck _, e := t.Parse("{{unknown}}", "", "", map[string]*parse.Tree{}) fmt.Println(e == nil)}