https://stackoverflow.com/questions/7933460/how-do-you-write-multiline-strings-in-go
Go 语言中有没有像 Python 中的多行字符串的东西,例如:
"""line 1
line 2
line 3"""
如果没有,用哪种方式写占据多行的字符串比较合适呢?
根据 语言规范,你可以使用原始字符串,它用反引号代替双引号来分隔字符串。
`line 1
line 2
line 3`
https://stackoverflow.com/questions/7933460/how-do-you-write-multiline-strings-in-go
Go 语言中有没有像 Python 中的多行字符串的东西,例如:
"""line 1
line 2
line 3"""
如果没有,用哪种方式写占据多行的字符串比较合适呢?
根据 语言规范,你可以使用原始字符串,它用反引号代替双引号来分隔字符串。
`line 1
line 2
line 3`