summaryrefslogtreecommitdiff
path: root/src/pkg/template/template.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
committerRuss Cox <rsc@golang.org>2009-11-20 11:45:05 -0800
commitc861f30835090bbd6b9b35a80667f26952843767 (patch)
tree645bd57ef3c9326ec02e646a751b9075d12a79e7 /src/pkg/template/template.go
parent7089e97992d5d6be520dfea787200061992526c8 (diff)
downloadgolang-c861f30835090bbd6b9b35a80667f26952843767.tar.gz
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
Diffstat (limited to 'src/pkg/template/template.go')
-rw-r--r--src/pkg/template/template.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/template/template.go b/src/pkg/template/template.go
index 6964d67f4..3cd9b542c 100644
--- a/src/pkg/template/template.go
+++ b/src/pkg/template/template.go
@@ -199,7 +199,7 @@ func white(c uint8) bool { return c == ' ' || c == '\t' || c == '\r' || c == '\n
// Safely, does s[n:n+len(t)] == t?
func equal(s []byte, n int, t []byte) bool {
- b := s[n:len(s)];
+ b := s[n:];
if len(t) > len(b) { // not enough space left for a match.
return false
}
@@ -387,7 +387,7 @@ func (t *Template) newVariable(name_formatter string) (v *variableElement) {
bar := strings.Index(name_formatter, "|");
if bar >= 0 {
name = name_formatter[0:bar];
- formatter = name_formatter[bar+1 : len(name_formatter)];
+ formatter = name_formatter[bar+1:];
}
// Probably ok, so let's build it.
v = &variableElement{t.linenum, name, formatter};