• Russ Cox's avatar
    text/template: add support for reflect.Value args, results in funcs · 5378dd77
    Russ Cox authored
    Add support for passing reflect.Values to and returning reflect.Values from
    any registered functions in the FuncMap, much as if they were
    interface{} values. Keeping the reflect.Value instead of round-tripping
    to interface{} preserves addressability of the value, which is important
    for method lookup.
    
    Change index and a few other built-in functions to use reflect.Values,
    making a loop using explicit indexing now match the semantics that
    range has always had.
    
    Fixes #14916.
    
    Change-Id: Iae1a2fd9bb426886a7fcd9204f30a2d6ad4646ad
    Reviewed-on: https://go-review.googlesource.com/31462Reviewed-by: 's avatarRob Pike <r@golang.org>
    5378dd77
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...