update tests and add debug templates log
This commit is contained in:
@@ -22,8 +22,10 @@ func TestMain(m *testing.M) {
|
||||
f.Write([]byte("{{ define \"layout/another\" }}<p>layout.another.gohtml</p><p>{{ .Data.bar }}</p>{{ block \"base/content\" . }}{{ end }}{{ end }}"))
|
||||
f.Close()
|
||||
f, _ = os.Create("templates/fragment.button.gohtml")
|
||||
f.Write([]byte("{{ define \"fragment/button\" }}<button>{{ .Data.buttonText }}</button>{{ end }}"))
|
||||
f.Close()
|
||||
f, _ = os.Create("templates/component.list.gohtml")
|
||||
f.Write([]byte("{{ define \"component/list\" }}<ul>{{ range .Data.items }}{{ template \"fragment/button\" . }}{{ end }}</ul>{{ end }}"))
|
||||
f.Close()
|
||||
f, _ = os.Create("templates/page.tindex.gohtml")
|
||||
f.Write([]byte("{{ template \"layout/base\" .}}{{ define \"base/content\" }}<p>page.tindex.gohtml</p><p>{{ .Data.bar }}</p>{{ end }}"))
|
||||
|
||||
Reference in New Issue
Block a user