I need to send some text which already consists double quotes as string
example := "<h1 style="exmaple">Hello</h1>"
as you can see this string is invalid
example := "<h1 style=\"exmaple\">Hello</h1>"
I know about this trick, but is there a more handy method to solve this issue, because I am receiving 200 lines of html, I should insert into it some values and return it back with some additional data.
str := fmt.Sprintf(`{"query": "{sendMailToRec(theme: \"` + theme + `\", html: \"` + html + `\", recipientList: \"` + recipientList + `\"){theme,html,recipientList} }"}`)
Here I am calling GraphQL resolver and html variable is my html string with already inserted values, the issue is that this query covers my string with additional double quotes and even I use this method to remove them
example := "<h1 style=\"exmaple\">Hello</h1>"
after graphql query is looks like
"<h1 style="exmaple">Hello</h1>"