Hi all,
So in a template I wanted to obtain a slice of lengths from a slice of slices.
Crafted examples:
{{- $lengths := apply (slice (slice 1 2) (slice 3 4)) "len" -}}
throws
... executing "*.html" at <apply (slice (slice 1 2) (slice 3 4)) "len">: error calling apply: runtime error: index out of range [0] with length 0
With context:
{{- $lengths := apply (slice (slice 1 2) (slice 3 4)) "len" "." -}}
throws
... executing "*.html" at <apply (slice (slice 1 2) (slice 3 4)) "len" ".">: error calling apply: called apply using []int as type reflect.Value
I expected it to work and I had to resort to slice-range-append method, any thoughts on this? Thank you.