• 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
..
scanner Loading commit data...
tabwriter Loading commit data...
template Loading commit data...