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
// Name returns the name of the template.
func (t *Template) Name() string {
- if t.name == "" {
- return "<unnamed>"
- }
return t.name
}