-
-
Notifications
You must be signed in to change notification settings - Fork 920
Open
Description
Hello,
Would it be possible to add a way to seed the random source used in RandomString? Currently the RandomString calls rand.Int64 which calls stdlib rand.Int64. I know there is a way to use stdlib rand.Seed but since it was depracated you have to jump through hoops to enable that behavior.
It would be great if you could do
lo.Seed(42)
lo.RandomString(...)which would generate the same string every time. Of course the default behavior should stay as is, that way i don't think this would be a breaking change.
The motivation being predictable testcases.
In anyway, thanks for this great library
Metadata
Metadata
Assignees
Labels
No labels