• 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
..
parse Loading commit data...
testdata Loading commit data...
doc.go Loading commit data...
example_test.go Loading commit data...
examplefiles_test.go Loading commit data...
examplefunc_test.go Loading commit data...
exec.go Loading commit data...
exec_test.go Loading commit data...
funcs.go Loading commit data...
helper.go Loading commit data...
multi_test.go Loading commit data...
option.go Loading commit data...
template.go Loading commit data...