I was having the same problem, same escapes special characters, what solved was to use the official client to go and its helpers.
Sample code:
from := mail.NewEmail("from", "from@mail.com")
to := mail.NewEmail("to", "to@mail.com")
content := mail.NewContent("text/html", contentHtml)
email := mail.NewV3MailInit(from, "Sample about sendgrid client", to, content)
personalization := mail.NewPersonalization()
personalization.AddTos(to)
email.AddPersonalizations(personalization)
client := sendgrid.NewSendClient(os.Getenv("SENDGRID_API_KEY"))
response, err = client.Send(email)
if err != nil {
return fmt.Errorf("Cannot send the email: %v", err)
}
if response.StatusCode != 202 {
return fmt.Errorf("Cannot send the email: %s", response.Body)
}