Permalink
Browse files

text/template: check ignored error in a test

Found with staticcheck. Not terribly important since the test would
likely fail anyway, but at least it will fail with a better explanation
now.

Change-Id: Ic3f9a94a2152404b7873cc8cd47b6db79d78c2e6
Reviewed-on: https://go-review.googlesource.com/62990
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information...
mvdan committed Sep 11, 2017
1 parent c2f8ed2 commit de2231888821add783305e7674bbb43d4d8453dc
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/text/template/multi_test.go
@@ -247,6 +247,9 @@ func TestAddParseTree(t *testing.T) {
t.Fatal(err)
}
added, err := root.AddParseTree("c", tree["c"])
if err != nil {
t.Fatal(err)
}
// Execute.
var b bytes.Buffer
err = added.ExecuteTemplate(&b, "a", 0)

0 comments on commit de22318

Please sign in to comment.