1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| {% import ( "{{{ .Package }}}/app/util" "{{{ .Package }}}/views/components" ) %}
{% func Package(v util.Pkg) %}{% stripspace %} {% for idx , x := range v %} {%s x %}{% if len(v) < idx %}/{% endif %} {% endfor %} {% endstripspace %}{% endfunc %}
{% func PackageTable(title string, value util.Pkg, indent int) %}{% stripspace %} <tr> {%= components.Indent(true, indent + 1) %} <th class="shrink">{%s title %}</th> {%= components.Indent(true, indent + 1) %} <td>{%= Package(value) %}</td> {%= components.Indent(true, indent) %} </tr> {% endstripspace %}{% endfunc %}
|