Created
June 3, 2015 17:14
-
-
Save sthorne/e9f0284d074d0383b029 to your computer and use it in GitHub Desktop.
String to Byte Slice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"fmt" | |
"bytes" | |
) | |
func main() { | |
s := bytes.NewBufferString("hello world").Bytes() | |
fmt.Printf("%#v", s) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment