Lines Matching full:template
5 package template
12 "text/template/parse"
16 root := Must(New("root").Parse(`{{define "a"}} {{.}} {{template "b"}} {{.}} "></a>{{end}}`))
34 // In the t0 template, it will be in a text context.
35 // In the t1 template, it will be in a URL context.
36 // In the t2 template, it will be in a JavaScript context.
37 // In the t3 template, it will be in a CSS context.
38 const tmpl = `{{define "a"}}{{template "lhs"}}{{.}}{{template "rhs"}}{{end}}`
41 // Create an incomplete template t0.
81 // Clone t0 as t4. Redefining the "lhs" template should fail.
121 // Some template definitions borrowed from TestClone.
123 {{define "a"}}{{template "lhs"}}{{.}}{{template "rhs"}}{{end}}
140 t.Error("could not find template", name)
156 t0 := Must(New("t0").Parse(`{{define "a"}}{{template "embedded"}}{{end}}`))
160 t.Error("adding a template to a clone added it to the original")
162 // double check that the embedded template isn't available in the original
165 t.Error("expected 'no such template' error")