Why does Go interpret byte as Unicode code point when appending to string?
I need to create a string consisting of a single byte corresponding to an integer of at most 255. It is acceptable that the string is not valid Unicode. Code: import ( "fmt" "strings" ) func main() { n := 255 s := "" s += string(byte(n)) fmt.Printf("Method 1: %x\n", s) sb := strings.Builder{} sb.WriteByte(byte(n))… Read More Why does Go interpret byte as Unicode code point when appending to string?