UUID Namespace Swapped
ChristianGaertner opened this issue · comments
Christian Gärtner commented
Hi,
Disclaimer: I'm not an expert in regards to UUIDs, but I just looked over your code and found this odd thing:
https://github.com/renstrom/shortuuid/blob/bc12e561a2565bb6377569675aa276013f9bc5e3/shortuuid.go#L48
It seems like the DNS and URL Namespaces are swapped.
You check for the http prefix and then assign the DNS namespace.
If this is indented, maybe a comment to explain why this is the case would be helpful.
Cheers,
Christian
Peter Lithammer commented
/facepalm, you're completely correct. What a blunder :) Thanks for noticing!