aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/text
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2013-03-08 16:39:54 -0800
committerRob Pike <r@golang.org>2013-03-08 16:39:54 -0800
commit0406c63ea38520adf040f3f72ea3d8008dd53480 (patch)
treec52344a2270c3d0c42fff4ad6e6b70caac5375ca /src/pkg/text
parent1b8f51c91794e3fb90e582ba22ad06b6ad28e1d4 (diff)
downloadgo-0406c63ea38520adf040f3f72ea3d8008dd53480.tar.xz
text/template: revert minor change to Name method
For better printing, I recently changed Name to return "<unnamed>" 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
Diffstat (limited to 'src/pkg/text')
-rw-r--r--src/pkg/text/template/template.go3
1 files changed, 0 insertions, 3 deletions
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 "<unnamed>"
- }
return t.name
}