How to index a slice element?

go-templates, slice

Solution

Use the `index` command like so:

{{index .Keys 3}}

Problem

I have a slice: `Keys []* datastore.Key` How could I index one of them in the template file? I guessed `{{.Keys[3] }}`, but that doesn't work and I searched a lot but with no clue. Any suggestions would be welcome, thanks.

Original source