This is a created article in which the information may have evolved or changed.
The string type of the go language is string inherently different from the string types in other languages:
Java string, C + + std::string, and Python3 str type are all just fixed-width character sequences
The go language string is a UTF-8-encoded, variable-width sequence of characters, each of which is represented by one or more bytes
That is: A Go language string is a constant sequence of arbitrary bytes .
Golang's double and back quotes can be used to represent a constant string, except that:
Double quotation marks are used to create resolvable string literals (escaped, but cannot be used to refer to multiple lines)
Anti-quotes are used to create native string literals, which may consist of multiple lines (no escape sequences are supported), and native string literals are used to write multiple lines of messages, HTML, and regular expressions
The single quotation marks are used to denote a special type of Golang: rune , like other languages, byte but not exactly, refers to code point literals (Unicode code points), without any escaping of the original content.
Reference Link: https://crazyof.me/blog/archives/2539.ht ...