The string in go is represented by this structure in C
struct String { byte* str; intgo len; };
The str pointer points to the actual string data, but it is not terminated by zero - the length is stored in the len element.
Thus, in terms of C, the go string is long from a primitive type; it is a pointer, length, and memory area.
However, Go is not C, and all of these implementation details are invisible to Go programs. In Go, a string is a primitive immutable type.
source share