How can you calculate something inside a html template of go?
For example:
{{ $length := len . }}
<p>The last index of this map is: {{ $length -1 }} </p>
Were the .
is a map.
The code {{ $length -1 }}
is not working, is there a way to achieve this?