• Rob Pike's avatar
    text/template: clarify the documentation around template definitions · f9ed2f75
    Rob Pike authored
    Due to the requirements of parsing template definitions that mention
    other templates that are not yet defined, a Template can be in two states:
    defined and undefined. Thus, although one calls New, the resulting
    template has no definition even though it exists as a data structure.
    
    Thus, for example, will return nil for a template that is named but not
    yet defined.
    
    Fixes #10910
    Fixes #10926
    
    Clarify the documentation a little to explain this,
    Also tidy up the code a little and remove a spurious call to init.
    
    Change-Id: I22cc083291500bca424e83dc12807e0de7b00b7a
    Reviewed-on: https://go-review.googlesource.com/10641Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    f9ed2f75
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...