aboutsummaryrefslogtreecommitdiff
path: root/src/text/template/parse
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2017-04-25 10:58:12 +0100
committerDaniel Martí <mvdan@mvdan.cc>2017-04-25 14:38:10 +0000
commit516e6f6d5d83dc3dcee6403fab25d5954bbf3f62 (patch)
treebee22fb6cea3296534ef24aafde3edbaec50d93e /src/text/template/parse
parent11c7b4491bd2cd1deb7b50433f431be9ced330db (diff)
downloadgo-516e6f6d5d83dc3dcee6403fab25d5954bbf3f62.tar.xz
all: remove some unused parameters in test code
Mostly unnecessary *testing.T arguments. Found with github.com/mvdan/unparam. Change-Id: Ifb955cb88f2ce8784ee4172f4f94d860fa36ae9a Reviewed-on: https://go-review.googlesource.com/41691 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/text/template/parse')
-rw-r--r--src/text/template/parse/lex_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/text/template/parse/lex_test.go b/src/text/template/parse/lex_test.go
index d655d788b3..2c73bb623a 100644
--- a/src/text/template/parse/lex_test.go
+++ b/src/text/template/parse/lex_test.go
@@ -498,7 +498,7 @@ func TestShutdown(t *testing.T) {
// We need to duplicate template.Parse here to hold on to the lexer.
const text = "erroneous{{define}}{{else}}1234"
lexer := lex("foo", text, "{{", "}}")
- _, err := New("root").parseLexer(lexer, text)
+ _, err := New("root").parseLexer(lexer)
if err == nil {
t.Fatalf("expected error")
}
@@ -511,7 +511,7 @@ func TestShutdown(t *testing.T) {
// parseLexer is a local version of parse that lets us pass in the lexer instead of building it.
// We expect an error, so the tree set and funcs list are explicitly nil.
-func (t *Tree) parseLexer(lex *lexer, text string) (tree *Tree, err error) {
+func (t *Tree) parseLexer(lex *lexer) (tree *Tree, err error) {
defer t.recover(&err)
t.ParseName = t.Name
t.startParse(nil, lex, map[string]*Tree{})