diff options
| author | Rob Pike <r@golang.org> | 2013-03-08 16:39:54 -0800 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2013-03-08 16:39:54 -0800 |
| commit | 0406c63ea38520adf040f3f72ea3d8008dd53480 (patch) | |
| tree | c52344a2270c3d0c42fff4ad6e6b70caac5375ca /src/pkg/text | |
| parent | 1b8f51c91794e3fb90e582ba22ad06b6ad28e1d4 (diff) | |
| download | go-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.go | 3 |
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 } |
