diff options
author | Robert Griesemer <gri@golang.org> | 2009-11-09 21:23:52 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-11-09 21:23:52 -0800 |
commit | 9aad19327eb719775a874f8f18bb15958db1d471 (patch) | |
tree | c515081857e0b9ad897c6d35b0be64fe4c346688 /src/pkg/template/template_test.go | |
parent | 073e240233589933c43143c997247c33206bb066 (diff) | |
download | golang-9aad19327eb719775a874f8f18bb15958db1d471.tar.gz |
- replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)
R=rsc, r
http://go/go-review/1024041
Diffstat (limited to 'src/pkg/template/template_test.go')
-rw-r--r-- | src/pkg/template/template_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/template/template_test.go b/src/pkg/template/template_test.go index a93faced0..0b95fcff4 100644 --- a/src/pkg/template/template_test.go +++ b/src/pkg/template/template_test.go @@ -46,7 +46,7 @@ func uppercase(v interface{}) string { for i := 0; i < len(s); i++ { c := s[i]; if 'a' <= c && c <= 'z' { - c = c+'A'-'a' + c = c + 'A' - 'a' } t += string(c); } @@ -55,7 +55,7 @@ func uppercase(v interface{}) string { func plus1(v interface{}) string { i := v.(int); - return fmt.Sprint(i+1); + return fmt.Sprint(i + 1); } func writer(f func(interface{}) string) (func(io.Writer, interface{}, string)) { @@ -387,7 +387,7 @@ func TestCustomDelims(t *testing.T) { var b bytes.Buffer; err = tmpl.Execute("hello", &b); s := b.String(); - if s != "template: hello" + ldelim + rdelim { + if s != "template: hello"+ldelim+rdelim { t.Errorf("failed delim check(%q %q) %q got %q", ldelim, rdelim, text, s) } } |