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?
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked">
{{range $id, $name := .test}}
{{if $name == .scoreheader}}
<li class="active">
{{else}}
<li>
{{end}}
<li><a href="/app/index/?company={{$id}}">{{$name}}</a></li>
{{end}}
</ul>
</div>