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
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 Tests
web_1402_issue