title: How to do IF/ELSE conditions inside LOOP in golang templates?
body: <p>I tried to do this test to figure out how to make conditions like this:</p>
  
  <pre><code>&lt;h1&gt;Country Index&lt;/h1&gt;
  
  &lt;style&gt;
  .odd{
      background: orange;
      color: black;
      font-size: 1.5em;
  }
  .even{
      background: rgb(0, 121, 235);
      color: white;
      font-size: 1.5em;
  }
  &lt;/style&gt;
  
  &lt;ul&gt;
      {{ range $index, $item := .Tee }}
          {{ if $index % 2 == 0 }}
              &lt;li class="even"&gt;{{ $index }} - {{ $item }}&lt;/li&gt;
          {{ else }}
              &lt;li class="odd"&gt;{{ $index }} - {{ $item }}&lt;/li&gt;
          {{ end }}
      {{ end }}
  &lt;/ul&gt;
  </code></pre>
  
  <p>I got this error "<strong>unexpected "%" in operand</strong>".</p>
  
  <p>Any suggestions to solve this?</p>