In a type of type Run: not a character type, it's just a different name for int32.
If you come from Java or a similar language, this will surprise you, because Java is of type char, and you can add char to the string.
String s = "hello"; char c = 'x'; System.out.println(s + c);
In Go, you need to be more explicit:
s := "hello"; c := 'x'; fmt.Println(s + string(c));
Omg do you really need to convert all char to string constants? Yes, but don’t worry, it’s just because of the type system, and the compiler optimizes it correctly. Under the hood, both Java and Go attach char in the same way.
If you think that adding extra lines, just compare how many times the keyword string is displayed in each example above. :)
Additional information: (technical data)
Go lines do not contain rune sequences, they are utf-8 encoded rune sequences. When you run through a string, you get runes, but you cannot just add a rune to a string. For example: the euro sign '€' is an integer 0x20AC (this is called a code point) But when you encode the euro sign in utf-8, you get 3 bytes: 0xE2 0x82 0xAC http://www.fileformat.info/info/unicode/ char / 20aC / index.htm
So adding char really works like this:
s = append(s, encodeToUtf8(c)) // Go s = append(s, encodeToUtf16(c)) // Java
Note that encodings are performed at compile time.
Utf-8 can encode a character with 1, 2, 3, or 4 bytes. Utf-16 can encode a character with 2 or 4 bytes.
So Go usually adds 1 byte (for ascii) or 2, 3, 4 bytes for Chinese, and Java usually adds 2 bytes (for ascii) or 4 bytes for Chinese.
Since most of the characters that we (the west) use can be encoded using two bytes, Java gives a false impression that strings are sequences of 2-byte char -s, which is true until you need to code 美国 必须 死