Skip to content
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

Update the Variant bits in method V4() of uuid.go #144

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

MrTbag
Copy link
Contributor

@MrTbag MrTbag commented Jul 9, 2023

Description

I changed the way the Variant bits were set in method V4() of uuid.go

Are you trying to fix an existing issue?

I'm trying to fix issue #134

The variant bits are set to RFC4122 by AND-ing the original bits with 0x3f and OR-ing them with 0x80.
Now, each time you run the code, it should generate a random UUID version 4

Go Version

$ go version
go version go1.19.5 windows/amd64   

Go Tests

$ go test

=== RUN   TestUUIDv4
--- PASS: TestUUIDv4 (0.00s)
PASS
ok      github.com/jaswdr/faker 0.034s

=== RUN   TestUUIDV4UniqueInSequence
--- PASS: TestUUIDV4UniqueInSequence (0.00s)
PASS
ok      github.com/jaswdr/faker 0.025s

#web_1402_issue

@jaswdr
Copy link
Owner

jaswdr commented Jul 13, 2023

LGTM

@jaswdr jaswdr closed this Jul 13, 2023
@jaswdr jaswdr reopened this Jul 13, 2023
@jaswdr jaswdr enabled auto-merge (squash) July 13, 2023 12:00
@jaswdr jaswdr merged commit 3d4bb9f into jaswdr:master Jul 13, 2023
69 checks passed
@jaswdr
Copy link
Owner

jaswdr commented Jul 17, 2023

@MrTbag your changes were released in v1.18.1. Congratulations for your first PR 🎉

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

Successfully merging this pull request may close these issues.

2 participants