change template expansion missing value handling (#36679)

This commit is contained in:
David Parrott 2021-07-13 06:57:18 -07:00 committed by GitHub
parent b37c59c1b2
commit 310d3ebe3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,7 +123,7 @@ func expandTemplate(name, text string, data map[string]string) (result string, r
}
}()
tmpl, err := text_template.New(name).Option("missingkey=zero").Parse(text)
tmpl, err := text_template.New(name).Option("missingkey=error").Parse(text)
if err != nil {
return "", fmt.Errorf("error parsing template %v: %s", name, err.Error())
}