• Özgür Kesim's avatar
    text/template: handle option missingkey=error consistently · 277bcbbd
    Özgür Kesim authored
    The existing implementation of text/template handles the option
    "missingkey=error" in an inconsitent manner:  If the provided data is
    a nil-interface, no error is returned (despite the fact that no key
    can be found in it).
    
    This patch makes text/template return an error if "missingkey=error"
    is set and the provided data is a not a valid reflect.Value.
    
    Fixes #15356
    
    Change-Id: Ia0a83da48652ecfaf31f18bdbd78cb21dbca1164
    Reviewed-on: https://go-review.googlesource.com/31638Reviewed-by: 's avatarRob Pike <r@golang.org>
    Run-TryBot: Rob Pike <r@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    277bcbbd
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...