Open
Description
I added xid to JR [1], which is a CLI random data generator.
As in google uuid [2], to be possible to use different rand algorithms rander should be refactored like this:
var rander = rand.Reader
and
func SetRand(r io.Reader) {
if r == nil {
rander = rand.Reader
return
}
rander = r
}
that could also be useful to generate sequences with a seed (to be reproducible), though time should be mocked too (if that it's interesting I can submit another patch)
[1] https://github.com/jrnd-io/jr
[2] https://github.com/google/uuid
Metadata
Metadata
Assignees
Labels
No labels