• Russ Cox's avatar
    html/template, text/template: drop defined template list from errors · ef3a9f2d
    Russ Cox authored
    The report in #17414 points out that if you have many many templates,
    then this is an overwhelming list and just hurts the signal-to-noise ratio of the error.
    
    Even the test of the old behavior also supports the idea that this is noise:
    
    	template: empty: "empty" is an incomplete or empty template; defined templates are: "secondary"
    
    The chance that someone mistyped "secondary" as "empty" is slim at best.
    
    Similarly, the compiler does not augment an error like 'unknown variable x'
    by dumping the full list of all the known variables.
    
    For all these reasons, drop the list.
    
    Fixes #17414.
    
    Change-Id: I78f92d2c591df7218385fe723a4abc497913acf8
    Reviewed-on: https://go-review.googlesource.com/32116
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRob Pike <r@golang.org>
    ef3a9f2d
Name
Last commit
Last update
.github Loading commit data...
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...