]> Cypherpunks repositories - gostls13.git/commitdiff
html/template: use correct method signature, in introduction example.
authorMike Rosset <mike.rosset@gmail.com>
Mon, 27 Feb 2012 00:31:38 +0000 (11:31 +1100)
committerNigel Tao <nigeltao@golang.org>
Mon, 27 Feb 2012 00:31:38 +0000 (11:31 +1100)
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5695067

src/pkg/html/template/doc.go

index 7f60f3b9680fb537f42c3162db4e3dcaf5a0e3b1..3699ea1a91c45c82e546239589f6f14c5e8b4b3f 100644 (file)
@@ -19,7 +19,7 @@ to parse and execute HTML templates safely.
 
   tmpl, err := template.New("name").Parse(...)
   // 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
 defined in the docs for ErrorCode.