I'm suggesting to add a function named slice to the predefined global functions under the text/template package that will mimic the slice expression in Go.
Calling slice returns the result of slicing its first argument by the following arguments.
Thus {{ slice x 1 3 }} is, in Go syntax, x[1:3]. Each sliced item must be a string, slice, or array.