Golang split string by newline

I’m trying to do the rather simple task of splitting a string by newlines.

This does not work:

temp := strings.Split(result,`\n`)

I also tried ’ instead of ` but no luck.

Any ideas?

You have to use "\n".

Splitting on \n, searches for an actual \ followed by n in the text, not the newline byte.