Dereferencing pointers in a golang text/template
<p>Inside a golang <a href="https://golang.org/pkg/text/template/" rel="nofollow">template</a> when simply outputting values it seems that pointers are automatically dereferenced. When <code>.ID</code> is a pointer to an <code>int</code>,</p>

<p><code>{{.ID}}</code> outputs <code>5</code></p>

<p>But when I try to use it in a pipeline, <code>{{if eq .ID 5}}</code> I get an error.</p>

<p><code>executing "mytemplate" at &lt;eq .ID 5&gt;: error calling eq: invalid type for comparison</code></p>

<p>How do I do a dereference of a pointer inside a template pipeline?</p>