golang put byte into slice and convert it to string code example
Example 1: golang byte to string
str:=string(data)
fmt.Print(str)
Example 2: golang []byte to string
s := string([]byte{65, 66, 67, 226, 130, 172})
fmt.Println(s) // ABC€
str:=string(data)
fmt.Print(str)
s := string([]byte{65, 66, 67, 226, 130, 172})
fmt.Println(s) // ABC€