change template expansion missing value handling (#36679) (#36715)

(cherry picked from commit 310d3ebe3d)

Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2021-07-14 10:30:40 +01:00
committed by GitHub
co-authored by David Parrott
parent 1d5ca3ae77
commit d6135f54a9
+1 -1
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())
}