title: How to access struct fields in a template
body: <p>I'd like to compare two variables of string type inside a range loop as follows:</p>
  
  <pre><code>&lt;select name="category" id="category"&gt;            
      {{range $c := .cats}}
        &lt;option value="{{$c.Title}}"  {{ if eq $c.Title .category}}active{{end}}&gt;{{$c.Title}}&lt;/option&gt;                                       
      {{end}}    
  &lt;/select&gt;
  </code></pre>
  
  <p>both <code>$c.Title</code> and <code>category</code> are strings dispatched by the controller.</p>
  
  <p>However, instead on drop down menue being in the rendered template, I get :</p>
  
  <blockquote>
    <p>can't evaluate field category in type model.category</p>
  </blockquote>
  
  <p><code>$c</code> is of struct type category:</p>
  
  <pre><code>type Category struct {
      ID        int       `db:"id"`
      Title     string    `db:"title"`
      Slug      string    `db:"slug"`
      CreatedAt time.Time `db:"created_at"`
  }
  </code></pre>
  
  <p>When I put directly the string value of <code>category</code> instead of <code>.category</code> in the code above, there is no issues.<br>
  I'm using  <a href="https://github.com/josephspurrier/gowebapp" rel="nofollow noreferrer">gowebapp</a> MVC framework, if it does matter.</p>
  
  <p>How can I fix this?</p>