Go 101: String or Byte Slice?
One of the first things you’ll notice in Go is that two different types are commonly used for representing text. string and []byte. A quick example is the regexp package which has functions for both string and []byte.
What is the difference?
string is immutable and []byte is mutable. Both can contain arbitrary bytes.
The name “string” implies unicode text but this is not enforced. Operating on string is like operating on []byte. You are working with bytes not characters.