Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
text/template: Template redefinition is not documented. #16912
I believe it may be an issue that template redefinition is not documented.
I only know it's possible to do so because Go 1.6 release notes mentioned it:
However, when I read documentation for text/template package, it does not seem to say that it's possible to redefine templates. It mentions this ability in passing, as part of documenting the block action:
However, it does not explicitly say anywhere that "it's possible to redefine a named template", nor does it discuss any limitations in doing so.
This may be an issue that can be resolved with a single sentence like "It's possible to redefine a template by defining it again."
This may also be a non-issue if we consider that the ability to redefine templates can be understood to be implicit (i.e., if template redefinition is not explicitly said to be disallowed, then it must be allowed).
I think mentioning that in the text/template docs would potentially resolve this issue, if it's an issue.