The err variable on line 31 was being semi-dropped in the case that the call to Decode() returned both an error and a length of 16.
I refactored ErrInvalidUUID a little bit so that an operator will see an error message that includes the invalid UUID causing the problem. I added TestErrInvalidUUID() to verify that it is returning the format that I expected.
The
err
variable on line 31 was being semi-dropped in the case that the call toDecode()
returned both an error and a length of 16.I refactored
ErrInvalidUUID
a little bit so that an operator will see an error message that includes the invalid UUID causing the problem. I addedTestErrInvalidUUID()
to verify that it is returning the format that I expected.