I'm trying to do the rather simple task of splitting a string by newlines.
This does not work:
temp := strings.Split(result,`
`)
I also tried ' instead of ` but no luck.
Any ideas?
I'm trying to do the rather simple task of splitting a string by newlines.
This does not work:
temp := strings.Split(result,`
`)
I also tried ' instead of ` but no luck.
Any ideas?
You have to use "
"
.
Splitting on `
`
, searches for an actual \
followed by n
in the text, not the newline byte.