Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

fix uuid.NewV4() in single-value context error by change to use github.com/gofrs/uuid #441

Merged
merged 2 commits into from
May 2, 2021

Conversation

hvquy001
Copy link

Due to https://github.com/satori/go.uuid is dead and no longer maintains
satori/go.uuid#84

I request to change to https://github.com/gofrs/uuid

@sshaplygin
Copy link
Collaborator

Hey, please look on discussion in PR #437
Do you can some refactoring into your code?

@hvquy001
Copy link
Author

hvquy001 commented May 1, 2021

My approach a little different. I changed to use https://github.com/gofrs/uuid instead of satori/go.uuid because it’s no longer maintain. And I just change the method to gen uuid. Nothing else. Please consider merging this request or other request asap because this error prevents us from using this module normally.

@sshaplygin
Copy link
Collaborator

Sorry, my comment muddle to you ((
I recommended use as a example by PR from @arrayindex-dev.
I suggest create new function genUUID in new file - helpers.go into root project path. Function will implement by uuid.Must(uuid.NewV4()).String() call from uuid libs

@hvquy001
Copy link
Author

hvquy001 commented May 2, 2021

I did it. I think the name newV4UUID is better for understanding.

Copy link

@arrayindex-dev arrayindex-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! 👍👍👍👍

@sshaplygin
Copy link
Collaborator

Great job!

@sshaplygin sshaplygin merged commit c249f7c into googollee:master May 2, 2021
@cleverlzc
Copy link

Well done!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants