title: Golang templates : how to define array in a variable?
body: <p>What would be the correct syntax to define an array variable inside a go template ? (here a HTML template). Here's what I tried :</p>
  
  <pre><code>{{define "template"}}
      {{ $x:=[]int{0,1,2} }}{{$x[0]}}
  {{end}}
  </code></pre>
  
  <p>The error log says : <code>unexpected "[" in command</code></p>
  
  <p>Thanks.</p>