Commit bf453eba authored by Nigel Tao's avatar Nigel Tao

doc: update Effective Go for template API change.

The original change 3378041 was submitted in December 2010:
template: change the signature of formatters for future development.

R=adg
CC=golang-dev
https://golang.org/cl/3862041
parent 5530bf90
......@@ -2857,8 +2857,8 @@ func QR(w http.ResponseWriter, req *http.Request) {
templ.Execute(req.FormValue("s"), w)
}
func UrlHtmlFormatter(w io.Writer, v interface{}, fmt string) {
template.HTMLEscape(w, []byte(http.URLEscape(v.(string))))
func UrlHtmlFormatter(w io.Writer, fmt string, v ...interface{}) {
template.HTMLEscape(w, []byte(http.URLEscape(v[0].(string))))
}
......
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