title: Go templates with eq and index
body: <p>Go templates have some unexpected results when using <code>eq</code> with <code>index</code> for me. See this code:</p>
  
  <pre><code>package main
  
  import (
      "os"
      "text/template"
  )
  
  func main() {
      const myTemplate = `
  {{range $n := .}}
      {{index $n 0}} {{if (index $n 0) eq (index $n 1)}}={{else}}!={{end}} {{index $n 1}}
  {{end}}
  `
      t := template.Must(template.New("").Parse(myTemplate))
  
      t.Execute(os.Stdout,
          [][2]int{
              [2]int{1, 2},
              [2]int{2, 2},
              [2]int{4, 2},
          })
  
  }
  </code></pre>
  
  <p>I expect to have output</p>
  
  <pre><code>1 != 2
  2 = 2
  4 != 2
  </code></pre>
  
  <p>but I get </p>
  
  <pre><code>1 = 2
  2 = 2
  4 = 2
  </code></pre>
  
  <p>What should I change to be able to compare array members in go templates?</p>