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

Issue 6218052: code review 6218052: text/template: exec should accept interface value as valid. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by ugorji
Modified:
11 years ago
Reviewers:
Visibility:
Public.

Description

text/template: exec should accept interface value as valid. Currently, if you pass some data to a template as an interface (e.g. interface{}) and extract that value that value as a parameter for a function, it fails, saying wrong type. This is because it is only looking at the interface type, not the interface content. This CL uses the underlying content as the parameter to the func. Fixes issue 3642.

Patch Set 1 : diff -r 820ffde8c396 https://code.google.com/p/go/ #

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

Total comments: 1

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M src/pkg/text/template/exec.go View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M src/pkg/text/template/exec_test.go View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 11
ugorji
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 10 months ago (2012-05-18 18:43:10 UTC) #1
r
needs a test. http://codereview.appspot.com/6218052/diff/1002/src/pkg/text/template/exec.go File src/pkg/text/template/exec.go (right): http://codereview.appspot.com/6218052/diff/1002/src/pkg/text/template/exec.go#newcode523 src/pkg/text/template/exec.go:523: if value.Kind() == reflect.Interface && !value.IsNil() ...
11 years, 10 months ago (2012-05-18 18:47:21 UTC) #2
ugorji
On 2012/05/18 18:47:21, r wrote: > needs a test. > > http://codereview.appspot.com/6218052/diff/1002/src/pkg/text/template/exec.go > File src/pkg/text/template/exec.go ...
11 years, 10 months ago (2012-05-18 18:55:53 UTC) #3
ugorji
Hello golang-dev@googlegroups.com, r@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 10 months ago (2012-05-18 19:24:07 UTC) #4
ugorji
Please hold off on review of the test.
11 years, 10 months ago (2012-05-18 19:47:53 UTC) #5
r2
On May 18, 2012, at 11:55 AM, ugorji@gmail.com wrote: > On 2012/05/18 18:47:21, r wrote: ...
11 years, 10 months ago (2012-05-18 20:03:12 UTC) #6
ugorji
Hello golang-dev@googlegroups.com, r@golang.org, r@google.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 10 months ago (2012-05-18 20:20:15 UTC) #7
ugorji
On 2012/05/18 20:20:15, ugorji wrote: > Hello mailto:golang-dev@googlegroups.com, mailto:r@golang.org, mailto:r@google.com (cc: > mailto:golang-dev@googlegroups.com), > > ...
11 years, 10 months ago (2012-05-18 20:28:45 UTC) #8
r
LGTM
11 years, 10 months ago (2012-05-22 22:18:46 UTC) #9
r
*** Submitted as http://code.google.com/p/go/source/detail?r=4c05c319570b *** text/template: exec should accept interface value as valid. Currently, if ...
11 years, 10 months ago (2012-05-22 22:21:48 UTC) #10
ugorji
11 years ago (2013-03-20 16:08:24 UTC) #11
Message was sent while issue was closed.
*** Abandoned ***
Sign in to reply to this message.

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