Created
March 19, 2015 03:34
-
-
Save scalone/d1e28a03da8788ebffae to your computer and use it in GitHub Desktop.
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" | |
"encoding/hex" | |
) | |
func main() { | |
sample1 := "\xbd\xb2\x3d\xbc\x20\xe2\x8c\x98" | |
str := "30bdb23dbc20e28c98" | |
fmt.Printf("hello, world\n") | |
b, err := hex.DecodeString(str) | |
fmt.Printf("Str %s \n", sample1) | |
fmt.Printf("Hex %s \n", str) | |
fmt.Printf("Err %s \n", err) | |
fmt.Printf("Byte %s \n", b) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment