-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted
Milestone
Description
There's an incorrect (and misleading) comment here:
// If the name is the name of this template, overwrite this template.
nt := t
if name != t.name {
nt = t.New(name)
}
It's probably mean't to be "If the name isn't...", but that's still not easy to read, and should potentially just be dropped? (It's fairly obvious what's going on)
The docs could be made more accurate instead:
AddParseTree adds parse tree for template with given name and associates it with t.
If the template does not already exist, it will create a new one.
If the template does exist, it will be replaced.
Should potentially be:
AddParseTree adds parse tree for template with given name and associates it with t.
If the template does not already exist, it will create a new one.
If the template does exist, it will be replaced, unless the given name matches the template's name.
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted