How to Convert String to Byte Array in Golang
If you want to convert the byte array to string in Go, use the string() constructor. Golang String to Byte Array To convert string to byte array in Go, use the []byte(). It will create a new byte slice that contains the same bytes as the string. Syntax []byte(string) Example package main import ( “fmt” ) func … Read more