Skip to content

Instantly share code, notes, and snippets.

@chespinoza
Created July 11, 2013 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chespinoza/5980151 to your computer and use it in GitHub Desktop.
Save chespinoza/5980151 to your computer and use it in GitHub Desktop.
A better string -> slice aproach according to myself :-)
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