Go Base64 Encoding Encoding to a String


Example

str := base64.StdEncoding.EncodeToString([]byte(`foo bar`))
fmt.Println(str)
// Output: Zm9vIGJhcg==

Playground