add uuid version 6 and 7#139
Merged
bormanp merged 2 commits intogoogle:masterfrom Nov 23, 2023
it512:master
Merged
Conversation
Contributor
Author
This was referenced Nov 15, 2023
Closed
bormanp
suggested changes
Nov 20, 2023
time.go
Outdated
|
|
||
| // Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in | ||
| // uuid. The time is only defined for version 1 and 2 UUIDs. | ||
| // uuid. The time is only defined for version 1, 2 and 6, 7 UUIDs. |
version7.go
Outdated
| } | ||
|
|
||
| // NewV7FromReader returns a Version 7 UUID based on the current time(Unix Epoch). | ||
| // it use NewRandomFromReader fill random bits, if error, NewV7FromReader returns Nil and an error |
Contributor
There was a problem hiding this comment.
// On error, NewV7FromReader returns Nil and an error.
version7.go
Outdated
| // | ||
| // NewV7 returns a Version 7 UUID based on the current time(Unix Epoch). | ||
| // Uses the randomness pool if it was enabled with EnableRandPool. | ||
| // NewV7 use NewRandom fill random bits, if error, NewV7 returns Nil and an error |
Contributor
There was a problem hiding this comment.
There is no need to specify the internal implementation. Line 22 should be:
// On error, NewV7 returns Nil and an error.
Contributor
Author
|
ok fix it. Thank you! |
bormanp
approved these changes
Nov 23, 2023
Closed
tkarrass
pushed a commit
to tkarrass/uuid
that referenced
this pull request
Sep 11, 2024
* add uuid version 6 and 7 * fix comment
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add uuid version6, version7
https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#variant_and_version_fields
recommit #138