title: Go alternative for python loop.last
body: <p>I'm looking to loop over an array with Go templates and I want to add an extra string to the last item in the loop.</p>
  
  <p>In python, I can do </p>
  
  <pre><code>{% for host in hosts %}
  {{ host }}{% if loop.last %} ;{% endif %}
  {% endfor %}
  </code></pre>
  
  <p>Looking to achieve same thing with Go, below is the snippet of the Go equivalent.</p>
  
  <pre><code>{{ range $host := $hosts }}
  {{$host}}
  {{ end }}
  </code></pre>
  
  <p>Thanks.</p>