From: Rob Pike Date: Sat, 9 Mar 2013 00:39:54 +0000 (-0800) Subject: text/template: revert minor change to Name method X-Git-Tag: go1.1rc2~626 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0406c63ea38520adf040f3f72ea3d8008dd53480;p=gostls13.git text/template: revert minor change to Name method For better printing, I recently changed Name to return "" for templates with empty names, but this causes trouble for the many packages that used "" as the template name, so restore the old behavior. It's usually printed as a quoted string anyway, so it should be fine. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/7577044 --- diff --git a/src/pkg/text/template/template.go b/src/pkg/text/template/template.go index d801c790ef..a2b9062ad1 100644 --- a/src/pkg/text/template/template.go +++ b/src/pkg/text/template/template.go @@ -40,9 +40,6 @@ func New(name string) *Template { // Name returns the name of the template. func (t *Template) Name() string { - if t.name == "" { - return "" - } return t.name }