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.
math/rand: add io.Reader interface to type Rand #8330
This is a feature request I would be willing to implement if it is deemed appropriate. I often find myself wanting to generate large pseudo-randomly filled files for testing and benchmarks. The io.Reader interface in crypto/rand is nice, but it is non-deterministic by design. Having an io.Reader interface on math/rand.Rand, paired with a consistent seed, would allow consistent random number generation from run-to-run of tests and benchmarks. Would this be an appropriate addition to the standard library?