-
-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap UUID format to byte array (#556)
With #546 merged in, UUIDs are defined as an alias for a string. Before that implementation gets mass adoption, I wanted to propose a slightly different alternative: basing the custom type off of `uuid.UUID` over `string`. This has the advantages of: - Being convertable back to a `uuid.UUID` without having to parse the string a second time, or opening the conversion up to failure scenarios - Still being easily convertable to `string` with the `uuid.UUID`'s `String` method - Taking up less space in memory - Reducing the number of invalid representations, since only `[16]byte`s can be represented, as opposed to all strings - Not adding any dependencies, since `uuid.UUID` is already being imported
- Loading branch information
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters