text/template, html/template: fix block example name

Change-Id: I004a43842430201296363a9745480bee94920041
Reviewed-on: https://go-review.googlesource.com/15084
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Andrew Gerrand 2015-09-29 10:16:09 +10:00
parent 652d2386e9
commit 02e8ec008c
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ func Example_escape() {
// The following example is duplicated in text/template; keep them in sync.
func ExampleBlock() {
func ExampleTemplate_block() {
const (
master = `Names:{{block "list" .}}{{"\n"}}{{range .}}{{println "-" .}}{{end}}{{end}}`
overlay = `{{define "list"}} {{join . ", "}}{{end}} `

View File

@ -76,7 +76,7 @@ Josie
// The following example is duplicated in html/template; keep them in sync.
func ExampleBlock() {
func ExampleTemplate_block() {
const (
master = `Names:{{block "list" .}}{{"\n"}}{{range .}}{{println "-" .}}{{end}}{{end}}`
overlay = `{{define "list"}} {{join . ", "}}{{end}} `