cloudspannerecosystem / spanner-dump

Command line tool for exporting a Cloud Spanner database in text format
Apache License 2.0
39 stars 13 forks source link

Update decoder.go #12

Closed jimmyruska closed 3 years ago

jimmyruska commented 3 years ago

Make sure hex is 0 padded and at least 2 characters wide.

Currently the binary to hex function can produce an invalid hex code, for example it may write \x1 instead of \x01 and \x1 is not a valid hex escape code. Example here: https://play.golang.org/p/lgcm9PyfmG8

jimmyruska commented 3 years ago

Hey Thanks! I've updated the test case for a 0 prefixed byte. Thanks for looking over this so quickly.