diff options
| author | Rob Pike <r@golang.org> | 2012-08-08 20:02:19 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2012-08-08 20:02:19 -0700 |
| commit | 18c378c259c0d71eccb25b70c01e1698a0279e7a (patch) | |
| tree | 72d584db7bb99a3e8db8c51c634c296bf6474a4f /src/pkg/text/template/parse/parse_test.go | |
| parent | af92b29fe63bd68b3892f6773b3da5896db52e6e (diff) | |
| download | go-18c378c259c0d71eccb25b70c01e1698a0279e7a.tar.xz | |
text/template: add 'nil' as a keyword in the language
The keyword reprents an untyped nil and is useful for
passing nil values to methods and functions. The
nil will be promoted to the appropriate type when
used; if a type cannot be assigned, an error results.
R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/6459056
Diffstat (limited to 'src/pkg/text/template/parse/parse_test.go')
| -rw-r--r-- | src/pkg/text/template/parse/parse_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/text/template/parse/parse_test.go b/src/pkg/text/template/parse/parse_test.go index b2e788238d..d7bfc78c05 100644 --- a/src/pkg/text/template/parse/parse_test.go +++ b/src/pkg/text/template/parse/parse_test.go @@ -205,8 +205,8 @@ var parseTests = []parseTest{ `{{range $x := .SI}}{{.}}{{end}}`}, {"range 2 vars", "{{range $x, $y := .SI}}{{.}}{{end}}", noError, `{{range $x, $y := .SI}}{{.}}{{end}}`}, - {"constants", "{{range .SI 1 -3.2i true false 'a'}}{{end}}", noError, - `{{range .SI 1 -3.2i true false 'a'}}{{end}}`}, + {"constants", "{{range .SI 1 -3.2i true false 'a' nil}}{{end}}", noError, + `{{range .SI 1 -3.2i true false 'a' nil}}{{end}}`}, {"template", "{{template `x`}}", noError, `{{template "x"}}`}, {"template with arg", "{{template `x` .Y}}", noError, |
