tpl/internal: Sync go_templates

Closes #10411
This commit is contained in:
Bjørn Erik Pedersen
2022-11-14 19:13:09 +01:00
parent 58a98c7758
commit f6ab9553f4
34 changed files with 739 additions and 514 deletions

View File

@@ -30,7 +30,7 @@ func TestTemplateClone(t *testing.T) {
const want = "stuff"
parsed := Must(clone.Parse(want))
var buf bytes.Buffer
var buf strings.Builder
err = parsed.Execute(&buf, nil)
if err != nil {
t.Fatal(err)
@@ -211,7 +211,7 @@ func (c *testCase) mustNotParse(t *Template, text string) {
}
func (c *testCase) mustExecute(t *Template, val any, want string) {
var buf bytes.Buffer
var buf strings.Builder
err := t.Execute(&buf, val)
if err != nil {
c.t.Fatalf("execute: %v", err)