-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add uuid version 6 and 7 #139
Conversation
time.go
Outdated
@@ -108,12 +108,23 @@ func setClockSequence(seq int) { | |||
} | |||
|
|||
// 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1, 2, 6 and 7.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to specify the internal implementation. Line 22 should be:
// On error, NewV7 returns Nil and an error.
ok fix it. Thank you! |
* add uuid version 6 and 7 * fix comment
add uuid version6, version7
https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#variant_and_version_fields
recommit #138