Closed JoshuaSjoding closed 6 years ago
Renaming the function would be backwards breaking. A well documented change to ParseBytes is probably a better solution. This can be combined with Issue 24.
I will close this issue out as I don't see it changing. Please re-open if you feel strongly about it.
When I first encountered the
ParseBytes
function I was very surprised that it wasn't meant to parse the raw 16 bytes of a uuid, but instead was meant to parse hexadecimal data. I suspect other users of the library will have the same reaction. It turned out that what I actually was looking for wasFromBytes
.I realize that it's useful to have a hexadecimal byte-parsing function for performance reasons because it avoids copying data around, but if I hadn't checked the docs I might not have realized I had the wrong function until I received an error from it.
I propose that one of two actions be taken:
ParseBytes
toParseHexBytes
to make its intention more clearParseBytes
to include handling for 16-byte inputs that are then fed intoUnmarshalBinary