package templates import ( "bytes" "html/template" "github.com/warmbly/warmbly/internal/observability/errs" ) const registrationCodeContent = `
Verify
Enter this code to finish creating your account.
| {{.Code}} |
Expires in 15 minutes
` var registrationCodeTmpl = template.Must(template.New("registration_code_content").Parse(registrationCodeContent)) func GenerateRegistrationCodeHTML(code string) (string, error) { data := struct { Code string Brand string }{Code: code, Brand: CompanyName()} var buf bytes.Buffer if err := registrationCodeTmpl.Execute(&buf, data); err != nil { errs.CaptureException(err) return "", err } return renderEmail("Your Verification Code", buf.String()) }