aboutsummaryrefslogtreecommitdiff
path: root/src/text/template/parse/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/text/template/parse/parse.go')
-rw-r--r--src/text/template/parse/parse.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/text/template/parse/parse.go b/src/text/template/parse/parse.go
index ff1358b001..1a63961c13 100644
--- a/src/text/template/parse/parse.go
+++ b/src/text/template/parse/parse.go
@@ -38,8 +38,8 @@ type Tree struct {
type Mode uint
const (
- ParseComments Mode = 1 << iota // parse comments and add them to AST
- DeferFuncCheck // defer type checking functions until template is executed
+ ParseComments Mode = 1 << iota // parse comments and add them to AST
+ SkipFuncCheck // do not check that functions are defined
)
// Copy returns a copy of the Tree. Any parsing state is discarded.
@@ -690,7 +690,7 @@ func (t *Tree) operand() Node {
func (t *Tree) term() Node {
switch token := t.nextNonSpace(); token.typ {
case itemIdentifier:
- checkFunc := t.Mode&DeferFuncCheck == 0
+ checkFunc := t.Mode&SkipFuncCheck == 0
if checkFunc && !t.hasFunction(token.val) {
t.errorf("function %q not defined", token.val)
}