templates: Remove ParseTemplate as it's unused

This commit is contained in:
Reto Brunner 2020-11-02 22:33:08 +01:00
parent fc9ccc3000
commit 03fa9ad99b

View file

@ -211,17 +211,3 @@ func ParseTemplateFromFile(templateName string, templateDirs []string, data inte
} }
return &body, nil return &body, nil
} }
func ParseTemplate(templateText string, data interface{}) ([]byte, error) {
emailTemplate, err :=
template.New("email_template").Funcs(templateFuncs).Parse(templateText)
if err != nil {
return nil, err
}
var outString bytes.Buffer
if err := emailTemplate.Execute(&outString, data); err != nil {
return nil, err
}
return outString.Bytes(), nil
}