mirror of
https://github.com/golang/go
synced 2024-11-21 19:54:41 -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:
parent
5530bf90cd
commit
bf453eba90
@ -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))))
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user