Go strings are immutable UTF-8 sequences stored as a pointer to a byte slice and a length, meaning you cannot modify them in place. To change a string, you must convert it to a byte slice, modify the slice, and convert it back to a string.
s := "hello"
// Convert to byte slice
b := []byte(s)
b[0] = 'H' // Modify the slice
// Convert back to string
newS := string(b) // "Hello"
Because strings are immutable, operations like concatenation or substring extraction create new string values rather than modifying the original. This design ensures thread safety and allows the compiler to optimize string handling efficiently.