Created
July 11, 2013 23:12
-
-
Save chespinoza/5980151 to your computer and use it in GitHub Desktop.
A better string -> slice aproach according to myself :-)
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
package main | |
import "fmt" | |
func main() { | |
str := "abc" | |
mySlice := []byte(str) | |
fmt.Printf("%v -> '%s'",mySlice,mySlice ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment