Reputation: 105
That is what I have, and I tried to split like: (Using Golang)
idPost = strings.Split(idPost,'"')
but the compiler said IncompatibleAssign using '"'.
Upvotes: 6
Views: 13178
Reputation: 171
Use a back quote instead of an apostrophe, example:
idPost = strings.Split(idPost,`"`)
Upvotes: 12
Reputation: 16554
you need to escape it, so your question is how to escape characters in go.
You will find this is similar across many languages:
dPost = strings.Split(idPost,"\"")
Upvotes: 1