Commit 4762e9d9 authored by Mike Rosset's avatar Mike Rosset Committed by Nigel Tao

html/template: use correct method signature, in introduction example.

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5695067
parent cd1a2f7e
...@@ -19,7 +19,7 @@ to parse and execute HTML templates safely. ...@@ -19,7 +19,7 @@ to parse and execute HTML templates safely.
tmpl, err := template.New("name").Parse(...) tmpl, err := template.New("name").Parse(...)
// Error checking elided // Error checking elided
err = tmpl.Execute(out, "Foo", data) err = tmpl.Execute(out, data)
If successful, tmpl will now be injection-safe. Otherwise, err is an error If successful, tmpl will now be injection-safe. Otherwise, err is an error
defined in the docs for ErrorCode. defined in the docs for ErrorCode.
......
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