convert string to byte array in golang code example
Example 1: go string to byte array
b := []byte("ABC€")
s := string([]byte{65, 66, 67, 226, 130, 172})
Example 2: golang string to bytes
hello := []byte("hello-world")
b := []byte("ABC€")
s := string([]byte{65, 66, 67, 226, 130, 172})
hello := []byte("hello-world")