E0147: A template file declares more than one struct
A .vuka.html file renders one struct, declared in the Go above its markup. The file declares two or more, so which one the markup renders isn't said by the file. The error is at the second.
Wrong
html
<!-- page.vuka.html -->
<script lang="go">
package pages
type Page struct {
Rows []Row
}
type Row struct {
ID int
}
</script>
<ul>…</ul>Right
A struct with markup of its own goes in its own .vuka.html file; one without markup — data, a form's fields — goes in a .go file:
go
// row.go
package pages
type Row struct {
ID int
}html
<!-- page.vuka.html -->
<script lang="go">
package pages
type Page struct {
Rows []Row
}
</script>
<ul>…</ul>