{% import "todo/models" %} {% code type EditPage struct { Todos []models.Todo EditingTodo models.Todo } %} {% func (p *EditPage ) Title() %} Todo {% endfunc %} {% func (p *EditPage ) Stylesheets() %} {% endfunc %} {% func (p *EditPage ) Scripts() %} {% endfunc %} {% func (p *EditPage ) Body() %}

TODO in Golang

{% for _, todo := range p.Todos %}
{%= GetDoneButton(todo.Done) %}

{%s todo.Todo %}

{% if todo.Id == p.EditingTodo.Id %}
{% else %}
{% endif %}
{% endfor %}
{% endfunc %}