Golang String do bajtów
hello := []byte("hello-world")
Friendly Fox
hello := []byte("hello-world")
str:=string(data)
fmt.Print(str)
package main
import (
"fmt"
)
func main() {
var s string = "Hello World"
sb := []byte(s)
fmt.Println(sb) // [72 101 108 108 111 32 87 111 114 108 100]
fmt.Println(string(sb)) // Hello World
}