Closed trentclowater closed 7 months ago
@trentclowater thank you for reporting, I'll check this out.
Did you find some time to take a look at this @jaswdr
This seems to be already fixed by https://github.com/jaswdr/faker/pull/165, unfortunately, it's not tagged/released yet.
A quick workaround is to:
go get -u github.com/jaswdr/faker/v2@ae23891d4c901b3603aad44fa0bba41cf0735f84
@edigaryev Note that #165 just reverts a fix for a panic that existed originally, so the potential for a panic is still there. The problems with Int64
and Int
only returning positive numbers still exists also. So even though it is no longer returning 0
values, it still has some problems.
@stephenafamo unfortunately I was not able to got to this.
RandomNumber
or IntBetween
instead of just Int
Released v2.1.0 with fix and tests to avoid this issue. Please @trentclowater check it out and feel free to reopen this issue if needed.
Describe the bug Changes made to
v2.0.3
seem to have broken the Int and Uint methods. The sample code in the Go Playground will generate the output below (10 random numbers for each method). OnlyUint()
appears to be working correctly.They appear to be working more correctly with
v2.0.2
(althoughInt64
andInt
do not appear to be producing any negative values withv2.0.2
):To Reproduce See https://goplay.tools/snippet/6eRhDKSKzfW
Expected behavior A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
go version
output: go version go1.21.6 darwin/arm64