title: Go template checking for current page for nav bar
body: <p>I'm trying to set a li in a golang template to active based on the current page. From what I've read you can only do {{if .scoreheader}} to check existence of a variable. Is there another way around this?</p>
  
  <pre><code>    &lt;div class="col-md-3"&gt;
        &lt;ul class="nav nav-pills nav-stacked"&gt;
  
          {{range $id, $name := .test}}
              {{if $name == .scoreheader}}
              &lt;li class="active"&gt;
              {{else}}
              &lt;li&gt;
              {{end}}
              &lt;li&gt;&lt;a href="/app/index/?company={{$id}}"&gt;{{$name}}&lt;/a&gt;&lt;/li&gt;
          {{end}}
        &lt;/ul&gt;
      &lt;/div&gt;
  </code></pre>