• Aamir Khan's avatar
    text/template: refactor code to accomodate bi-state requirement for templates · 6d9df14f
    Aamir Khan authored
    This is follow-up to CL10607
    
    - Refactor AddParseTree() to use t.associate()
    - Refactor Parse() to use AddParseTree() to put entries into common structure
    - Clone() should not put entry in t.tmpl for undefined template
    - Clarify documentation for Templates()
    - Clarify documentation for AddParseTree() to include the error case
    
    Updates #10910
    Uodates #10926
    
    Includes test cases for most of the above changes
    
    Change-Id: I25b2fce6f9651272866f881acf44e4dbca04a4a8
    Reviewed-on: https://go-review.googlesource.com/10622Reviewed-by: 's avatarRob Pike <r@golang.org>
    Run-TryBot: Rob Pike <r@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    6d9df14f
multi_test.go 9.49 KB