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

2018-05-04 Thread Amandeep Kaur
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 > > //jb > >

[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"

[go-nuts] Email sent via command line is not delivered in Golang

2018-01-24 Thread Amandeep Kaur
I am sending emails in one of my projects through command line. The project back end is written in Golang. I am using following code to send emails: package utils import( "bytes" "html/template" "os/exec" "fmt" ) type EmailRequest struct{

[go-nuts] Re: Update Mongodb fields with omitempty flag in Golang structure

2017-11-10 Thread Amandeep Kaur
ol `json:"single_use_per_user,omitempty" > bson:"single_use_per_user,omitempty"` > } > > > the bson/json Un/marshaller will then omit the values that are nil > pointers, so now yo ucan tell the difference between a false checkbox, and > a REST POST that d

[go-nuts] Update Mongodb fields with omitempty flag in Golang structure

2017-11-07 Thread Amandeep Kaur
Hi I am working on a Coupon form in which I have some optional fields. *Introduction:* All the form field values are received as JSON and mapped into a Golang structure. In the structure, I have added an "omitempty" flag with every field. So only those form values are mapped which have