Beego:如何在模板中使用If-else条件?

How do I use conditions in beego's templating system? Or is it just expected that we use this for templating instead?

https://github.com/ipfans/beego-pongo2.v2

I'd like to try my best first to do this Beego's way before latching something else on here. I mean....surely conditional rendering was thought of when creating beego's stock templating system right?

While we're at it what about looping?

From Beego Template Parsing docs:

Beego uses Go’s builtin package html/template as the template parser.

Beego WebIM Sample:

<script src="/static/js/jquery-1.10.1.min.js"></script>
{{if .IsLongPolling}}
<script src="/static/js/longpolling.js"></script>
{{else}}
<script src="/static/js/websocket.js"></script>
{{end}}