From: Rob Pike Date: Sat, 18 Feb 2012 05:02:51 +0000 (+1100) Subject: html/template: replace obsolete reference to template.Set X-Git-Tag: weekly.2012-02-22~132 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=701fb580bd1d199027126b00f1a2aee2f65afd97;p=gostls13.git html/template: replace obsolete reference to template.Set Fixes #3053. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5656094 --- diff --git a/src/pkg/html/template/doc.go b/src/pkg/html/template/doc.go index 6fe507abea..23611bcfc5 100644 --- a/src/pkg/html/template/doc.go +++ b/src/pkg/html/template/doc.go @@ -17,11 +17,11 @@ Introduction This package wraps package text/template so you can share its template API to parse and execute HTML templates safely. - set, err := new(template.Set).Parse(...) + tmpl, err := template.New("name").Parse(...) // Error checking elided - err = set.Execute(out, "Foo", data) + err = tmpl.Execute(out, "Foo", data) -If successful, set 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. HTML templates treat data values as plain text which should be encoded so they