I have html stored in a table returning as a string, and I want to insert it into my html template. Currently it just renders as a string:
Eg. assume my myHtmlString var value is <h3>Hello</h3>
func (h *handler) buildEmailTemplate() model.myEmailModel {
return model.myEmailModel {
message: myHtmlString
}
}
type myEmailModel {
message: template.HTML '<h1>Hello</h1>'
}
I've tried changing this buildEmailTemplate function to parse to a template.HTML string unsuccessfully:
message: template.HTML(myHtmlString)