-
Notifications
You must be signed in to change notification settings - Fork 94
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
Leverage github.com/google/uuid where possible #48
Conversation
where appropriate. There should be no functional change with this commit. This has been done to reduce the amount of redundant code between the two packages, in particular, code dealing with the clock, random numbers, and determining the node ID from the network interfaces. Where reasonable, this package is just a wrapper around google/uuid. There still is duplicated code to limit the performance impact of wrapping small functions. The Version, Variant and Time types are now aliases of the google/uuid types.
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.
For whatever reason I cannot submit my other comment on marshal.go
's UnmarshalText
function so here it is:
The error pattern I'm used to is usually "flipped" from this:
if err != nil {
... handle the error ...
... return with wrapped error ...
}
... handle the success ...
return nil
Ie, the "happy path" is on the root indent. Any reason for the different style here? It looks like the existing code (before the change) worked this way.
.travis.yml
Outdated
@@ -2,7 +2,6 @@ language: go | |||
|
|||
go: | |||
- 1.9 | |||
- 1.10 |
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.
I've seen this issue before. Fix can be found here
Thanks for the review and the "travis" fix. Hopefully my latest commit will run properly. The reason I wrote Array.UnmarshalText as:
rather than
had two weak reasons. The first is I am not tied to either version so I will modify it to do the |
Resolving conflicts will be simple, but it is not clear to me if I resolve the conflict and click the "merge" button what will happen (will it merge it into the branch or merge the pull request?) |
It looks like there are conflicts in the |
Thank you for your reviews! |
This change leverages the github.com/google/uuid package where reasonable. There is still duplicated code due to performance reasons.