Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new constructor to faker #132

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Kingmidas74
Copy link
Contributor

Description

I've added new constructor with pure number as parameter. It can simplify client code. We can reduce imports and pass rand.Source into the package

Go Version

$ go version
go version go1.19.5 darwin/arm64

Go Tests

$ go test
2023/02/27 22:30:26 Error while requesting https://loremflickr.com/300/200 : request failed
2023/02/27 22:30:26 Error while creating a temp file: temp file creation failed
2023/02/27 22:30:27 Error while requesting https://thispersondoesnotexist.com/image : request failed
2023/02/27 22:30:27 Error while creating a temp file: temp file creation failed
PASS
ok      github.com/jaswdr/faker 5.388s

@jaswdr
Copy link
Owner

jaswdr commented Feb 28, 2023

Thank you for the contribution. There is one failed check from DeepSource related with the weak random number and the math/rand package. Would you mind replacing the math/rand with crypto/rand so we can get rid of this warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants