]> Cypherpunks repositories - gostls13.git/commit
html/template: Add missing error check to package example.
authorDmitri Shuralyov <shurcooL@gmail.com>
Sun, 22 Nov 2015 01:09:08 +0000 (17:09 -0800)
committerAndrew Gerrand <adg@golang.org>
Sun, 22 Nov 2015 22:00:21 +0000 (22:00 +0000)
commit2221bc35cf5b133071feea7013b4c6509ae3b563
tree8f6425c6ba4871bc280b65de5bacb17385756c02
parent54bd5a71d37f1c69d070af5daa0949092ad59c8b
html/template: Add missing error check to package example.

This appears to be an unintended omission. The check func is declared
just above, and the err value from template.Parse is captured rather
than discarded via blank identifier. All following calls that similarly
return err are checked, so it can't be that this example elides error
checking for brevity. Finally, if you look at Example_autoescaping,
it does check err from template.Parse and its code is very similar.

Change-Id: I076e1846302d5f2cdb1d027ed85ca0db85e33ace
Reviewed-on: https://go-review.googlesource.com/17170
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/html/template/example_test.go