Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
text/template: indirect interfaces before slicing
The recently added slice function used indirectInterface, but then forgot to actually call reflect.Value.Slice on its result. Calling the Slice method on the original Value without indirectInterface would result in a panic, if our slice was indeed behind an interface. Fix that, and add test cases for all three built-in functions that work with slices. Fixes #36199. Change-Id: I9a18f4f604a3b29967eefeb573f8960000936b88 Reviewed-on: https://go-review.googlesource.com/c/go/+/211877 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rob Pike <[email protected]>
- Loading branch information