tpl: Pull in Go 1.18 patch that fixes the "no space in {{ continue }} and {{ break }}" bug

This commit is contained in:
Bjørn Erik Pedersen
2022-03-16 13:11:29 +01:00
parent e792d27017
commit 3476b53343
5 changed files with 15 additions and 8 deletions

View File

@@ -263,6 +263,10 @@ var parseTests = []parseTest{
{"newline in pipeline", "{{\n\"x\"\n|\nprintf\n}}", noError, `{{"x" | printf}}`},
{"newline in comment", "{{/*\nhello\n*/}}", noError, ""},
{"newline in comment", "{{-\n/*\nhello\n*/\n-}}", noError, ""},
{"spaces around continue", "{{range .SI}}{{.}}{{ continue }}{{end}}", noError,
`{{range .SI}}{{.}}{{continue}}{{end}}`},
{"spaces around break", "{{range .SI}}{{.}}{{ break }}{{end}}", noError,
`{{range .SI}}{{.}}{{break}}{{end}}`},
// Errors.
{"unclosed action", "hello{{range", hasError, ""},