mirror of
https://git.sr.ht/~sircmpwn/aerc
synced 2024-11-23 00:21:59 +01:00
templates: Remove ParseTemplate as it's unused
This commit is contained in:
parent
fc9ccc3000
commit
03fa9ad99b
@ -211,17 +211,3 @@ func ParseTemplateFromFile(templateName string, templateDirs []string, data inte
|
||||
}
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user