From 28592ee1ea1f5cdffcf85472f9de0285d928cf12 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Wed, 3 Aug 2011 16:54:30 +0200 Subject: Imported Upstream version 59 --- src/pkg/template/execute.go | 2 +- src/pkg/template/parse.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/template') diff --git a/src/pkg/template/execute.go b/src/pkg/template/execute.go index 5bc7ff7e9..464b620c9 100644 --- a/src/pkg/template/execute.go +++ b/src/pkg/template/execute.go @@ -114,7 +114,7 @@ func (t *Template) findVar(st *state, s string) reflect.Value { if s == "@" { return indirectPtr(data, numStars) } - for _, elem := range strings.Split(s, ".", -1) { + for _, elem := range strings.Split(s, ".") { // Look up field; data must be a struct or map. data = t.lookup(st, data, elem) if !data.IsValid() { diff --git a/src/pkg/template/parse.go b/src/pkg/template/parse.go index b4aa5fcd2..dedf9ad8e 100644 --- a/src/pkg/template/parse.go +++ b/src/pkg/template/parse.go @@ -483,7 +483,7 @@ func extractFormatters(words []string) (formatters []string) { } } words[len(words)-1] = lastWord[0:bar] - formatters = strings.Split(lastWord[bar+1:], "|", -1) + formatters = strings.Split(lastWord[bar+1:], "|") return } -- cgit v1.2.3