Commit de223188 authored by Daniel Martí's avatar Daniel Martí

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: 's avatarIan Lance Taylor <iant@golang.org>
parent c2f8ed26
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment