Closed hryamzik closed 7 years ago
https://golang.org/pkg/text/template/#Template.ParseFiles
ParseFiles parses the named files and associates the resulting templates with t. If an error occurs, parsing stops and the returned template is nil; otherwise it is t. There must be at least one file. Since the templates created by ParseFiles are named by the base names of the argument files, t should usually have the name of one of the (base) names of the files. If it does not, depending on t's contents before calling ParseFiles, t.Execute may fail. In that case use t.ExecuteTemplate to execute a valid template.
I fixed it. Will push in the same PR with https://github.com/inCaller/prometheus_bot/issues/13
template_path: "testdata/default.tmpl"
doesn't work.