title: variables in go templates
body: <p>I'm getting an error when executing the following template code:</p>
  
  <pre><code>{{ $total := 0 }}
  {{range $i, $a := .my.vars}}
       {{ $total = (addi $total $a)}}
  {{end}}
  </code></pre>
  
  <p>Here's the error: <code>unexpected "=" in operand</code>. The total variable should also change outside of the <code>range</code>, so I can't use <code>:=</code>, because it would create a new variable inside the <code>range</code> instead of increasing the <code>$total</code> variable.</p>
  
  <p>The <code>addi</code> method is just a simple addition, the error does also occurr without it. It seems like the error is related to the <code>=</code> operator. If go templates don't support it, is there a workaround?</p>