The syntax var p * int means that the pointer itself is of type int or that it points to an int value? That is, can I use the var p * string syntax?

Is go string just a byte sequence?

    1 answer 1

    The syntax var p * int means that the pointer itself is of type int or that it points to an int value?

    Pointer to a value of type int.

    Is go string just a byte sequence?

    Not really. In C, not C lines, but P lines are used. That is, string is a type structure.

    type string struct { len int data *byte } 

    Where len is the length of the string, and data is a pointer to the first byte.