Basic Syntax

PuGo template use Go template syntax. Read text/template and html/template to learn basic syntax. There are some tips to help:

Global Scope

When use {{if}},{{range}},{{with}} keyword, it changes scope to current variable, not global scope, so you need use {{$}} to read data out of current scope:

<ul>{{range .List}}
    <li>item:{{.}} - from {{$.ListName}}</li>
{{end}}</ul>