I have an interesting problem to solve. Because of a tool that I have to talk to, I need to convert newlines to the literal string
I have the following data
{"name": 2019-05-25,
"tracker": {
"project": {
"uri": "/project/87",
"name": "Allen's Test"
},
"uri": "/tracker/57483",
"name": "Tasks"
},
"description": "[{Table
||Stack
||Current Version
||New Version
||Changes
|common
|1.0.214
|1.0.214
|* blah - [#345|https://blah.com/345]
|workflow
|2.2.23
|2.2.23
|* [ES-12345] blah - [#1087|https://blah.com/1087]
}]",
"descFormat": "Wiki"}
so basically instead of a multiline string, I need to convert it to a single line string with 's where the tool on the backend will convert it. I'm using go and not quite sure where to start. I asssume I need raw strings, but many of the source bits are api calls that have the newlines built in.
Any help would be appreciated.