1
0
mirror of https://github.com/golang/go synced 2024-11-24 20:10:02 -07:00

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
This commit is contained in:
Nigel Tao 2011-01-04 15:52:03 +11:00
parent 5530bf90cd
commit bf453eba90

View File

@ -2857,8 +2857,8 @@ func QR(w http.ResponseWriter, req *http.Request) {
templ.Execute(req.FormValue("s"), w) templ.Execute(req.FormValue("s"), w)
} }
func UrlHtmlFormatter(w io.Writer, v interface{}, fmt string) { func UrlHtmlFormatter(w io.Writer, fmt string, v ...interface{}) {
template.HTMLEscape(w, []byte(http.URLEscape(v.(string)))) template.HTMLEscape(w, []byte(http.URLEscape(v[0].(string))))
} }