In quotation marks, ""
you need to escape newlines, tabs, and other characters that do not need to be escaped in reverse checkmarks ''
. If you put a line break in a line with a reverse tag, it will be interpreted as a character '\n'
, see https://golang.org/ref/spec#String_literals
Thus, if you say \n
in the return line, it will be interpreted as a literal backslash and the character n.
source
share