Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
The Rand interface has methods for several types of random integers, including uint32 and int63, but no uint64. I need random integers in [0, 2^64). I can of course use two calls to Uint32 to do what I need, but see discussion here: https://groups.google.com/group/golang-nuts/browse_thread/thread/2a57bcef8953d44a/335e3adb37bb4333 It would be nice to add this for 2.0, or whenever it's next okay to make a break with the current API.
Some workarounds, for the convenience of anyone like me who stumbled on this issue: https://stackoverflow.com/questions/39756133/how-do-you-generate-a-random-uint64-in-go/
There is some code value too: types intending to implement Source64 can write a conversion confirming that. For #4254 and the Go 1.8 release notes. Change-Id: I7fc350a84f3a963e4dab317ad228fa340dda5c66 Reviewed-on: https://go-review.googlesource.com/33456 Run-TryBot: Russ Cox <email@example.com> Reviewed-by: Brad Fitzpatrick <firstname.lastname@example.org>