Re: [go-nuts] Html is not parsing while parsing a template to send email

2018-05-04 Thread Jakob Borg
Like this; https://play.golang.org/p/VVIOY7s9xQq //jb On 4 May 2018, at 13:32, Amandeep Kaur mailto:amandeepkaur4...@gmail.com>> wrote: Hi, Jakob Borg Thanks for ypur reply to the post. The solution you have provided can not be implemented on my system. I have provided a small sample of my

Re: [go-nuts] Html is not parsing while parsing a template to send email

2018-05-04 Thread Amandeep Kaur
Hi, Jakob Borg Thanks for ypur reply to the post. The solution you have provided can not be implemented on my system. I have provided a small sample of my code structure. Please take a look type EmailTemplate struct{ BookingDetails string } type EmailReques

Re: [go-nuts] Html is not parsing while parsing a template to send email

2018-05-04 Thread Jakob Borg
Hi, Your post is a bit confusing and I think you may be using the word "parse" in the opposite of it its common meaning. However, if you want to pass a HTML fragment through a HTML template and have it not be escaped, look at the template.HTML type: https://golang.org/pkg/html/template/#HTML /

[go-nuts] Html is not parsing while parsing a template to send email

2018-05-04 Thread Amandeep Kaur
Hello, I am working on a SAAS based project for which I need to send emails to different clients on different events. I am using email templates which use tokens (in format {{.TOKENNAME}}) that are made dynamic while sending emails. Now these token are parsed by using "html/template" package.