Skip to content

Instantly share code, notes, and snippets.

@gowinder
Created April 13, 2017 02:01
Show Gist options
  • Save gowinder/a95025b0f0c211575a272d9a42bb5a65 to your computer and use it in GitHub Desktop.
Save gowinder/a95025b0f0c211575a272d9a42bb5a65 to your computer and use it in GitHub Desktop.
golang string convert to byte slice
s := “abc”
b := []byte(s)
s2 := string(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment