cmd/rlpdump: allow hex input to have leading '0x'

This commit is contained in:
Jim McDonald 2017-10-27 09:40:52 +01:00
parent 0095531a58
commit 3e6d7c169b

@ -51,7 +51,7 @@ func main() {
var r io.Reader var r io.Reader
switch { switch {
case *hexMode != "": case *hexMode != "":
data, err := hex.DecodeString(*hexMode) data, err := hex.DecodeString(strings.TrimPrefix(*hexMode, "0x"))
if err != nil { if err != nil {
die(err) die(err)
} }