mirror of
https://github.com/golang/go
synced 2024-11-20 00:44:45 -07:00
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>
This commit is contained in:
parent
c2f8ed267b
commit
de22318888
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user