Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(162)

Issue 6459056: code review 6459056: text/template: add 'nil' as a keyword in the language (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by r
Modified:
12 years, 7 months ago
Reviewers:
CC:
rsc, dsymonds, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Total comments: 6

Patch Set 2 : diff -r d3dd48c73d6d https://code.google.com/p/go/ #

Patch Set 3 : diff -r d3dd48c73d6d https://code.google.com/p/go/ #

Patch Set 4 : diff -r 87e3318f6a52 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -12 lines) Patch
M src/pkg/text/template/doc.go View 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/text/template/exec.go View 1 4 chunks +22 lines, -6 lines 0 comments Download
M src/pkg/text/template/exec_test.go View 1 2 10 chunks +13 lines, -2 lines 0 comments Download
M src/pkg/text/template/funcs.go View 2 chunks +7 lines, -1 line 0 comments Download
M src/pkg/text/template/parse/lex.go View 3 chunks +3 lines, -0 lines 0 comments Download
M src/pkg/text/template/parse/lex_test.go View 1 chunk +6 lines, -0 lines 0 comments Download
M src/pkg/text/template/parse/node.go View 2 chunks +21 lines, -0 lines 0 comments Download
M src/pkg/text/template/parse/parse.go View 2 chunks +3 lines, -1 line 0 comments Download
M src/pkg/text/template/parse/parse_test.go View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7
r
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 7 months ago (2012-08-07 22:51:50 UTC) #1
dsymonds
LGTM
12 years, 7 months ago (2012-08-08 00:23:12 UTC) #2
rsc
http://codereview.appspot.com/6459056/diff/1/src/pkg/text/template/exec.go File src/pkg/text/template/exec.go (right): http://codereview.appspot.com/6459056/diff/1/src/pkg/text/template/exec.go#newcode331 src/pkg/text/template/exec.go:331: s.errorf("cannot assign type to untyped nil") It looks like ...
12 years, 7 months ago (2012-08-08 15:08:00 UTC) #3
r
Hello rsc@golang.org, dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 7 months ago (2012-08-08 16:53:45 UTC) #4
r
http://codereview.appspot.com/6459056/diff/1/src/pkg/text/template/exec.go File src/pkg/text/template/exec.go (right): http://codereview.appspot.com/6459056/diff/1/src/pkg/text/template/exec.go#newcode331 src/pkg/text/template/exec.go:331: s.errorf("cannot assign type to untyped nil") On 2012/08/08 15:08:00, ...
12 years, 7 months ago (2012-08-08 16:56:32 UTC) #5
rsc
LGTM
12 years, 7 months ago (2012-08-08 18:48:47 UTC) #6
r
12 years, 7 months ago (2012-08-09 03:02:31 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=0158b489366c ***

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
http://codereview.appspot.com/6459056
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b