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

Issue 13091045: code review 13091045: text/template: implement comparison of basic types (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 3 months ago by r
Modified:
4 years, 2 months ago
Reviewers:
adg, rsc
CC:
golang-dev, adg
Visibility:
Public.

Description

text/template: implement comparison of basic types Add eq, lt, etc. to allow one to do simple comparisons. It's basic types only (booleans, integers, unsigned integers, floats, complex, string) because that's easy, easy to define, and covers the great majority of useful cases, while leaving open the possibility of a more sweeping definition later. {{if eq .X .Y}}X and Y are equal{{else}}X and Y are unequal{{end}}

Patch Set 1 #

Total comments: 3

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

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

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

Patch Set 5 : diff -r 79e4edb2a8fc https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -2 lines) Patch
M src/pkg/text/template/doc.go View 1 2 3 4 1 chunk +26 lines, -2 lines 0 comments Download
M src/pkg/text/template/exec_test.go View 1 2 3 1 chunk +107 lines, -0 lines 0 comments Download
M src/pkg/text/template/funcs.go View 1 2 3 4 3 chunks +154 lines, -0 lines 0 comments Download

Messages

Total messages: 9
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
4 years, 3 months ago (2013-08-21 01:02:15 UTC) #1
adg
bad test and corresponding bug https://codereview.appspot.com/13091045/diff/1/src/pkg/text/template/exec_test.go File src/pkg/text/template/exec_test.go (right): https://codereview.appspot.com/13091045/diff/1/src/pkg/text/template/exec_test.go#newcode920 src/pkg/text/template/exec_test.go:920: {"gt 1 1", "true", ...
4 years, 3 months ago (2013-08-21 01:16:53 UTC) #2
r
Hello golang-dev@googlegroups.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
4 years, 3 months ago (2013-08-21 01:19:35 UTC) #3
r
Hello golang-dev@googlegroups.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
4 years, 3 months ago (2013-08-21 01:20:50 UTC) #4
r
Hello golang-dev@googlegroups.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
4 years, 3 months ago (2013-08-21 01:21:22 UTC) #5
adg
LGTM https://codereview.appspot.com/13091045/diff/1/src/pkg/text/template/doc.go File src/pkg/text/template/doc.go (right): https://codereview.appspot.com/13091045/diff/1/src/pkg/text/template/doc.go#newcode309 src/pkg/text/template/doc.go:309: eq add a blank above
4 years, 3 months ago (2013-08-21 01:24:04 UTC) #6
r
*** Submitted as https://code.google.com/p/go/source/detail?r=ddd49fd9241d *** text/template: implement comparison of basic types Add eq, lt, etc. ...
4 years, 3 months ago (2013-08-21 01:27:35 UTC) #7
rsc
eq is much more useful if it can take any number of arguments. https://groups.google.com/d/msg/golang-nuts/OEdSDgEC7js/iyhU9DW_IKcJ
4 years, 2 months ago (2013-09-03 20:56:46 UTC) #8
r
4 years, 2 months ago (2013-09-04 03:10:33 UTC) #9

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