faker
faker copied to clipboard
Add new constructor to faker
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
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?