jaswdr / faker

:rocket: Ultimate fake data generator for Go with zero dependencies
https://pkg.go.dev/github.com/jaswdr/faker
MIT License
566 stars 59 forks source link

Generate a word from English dictionary instead of lorem list of words #143

Open LordNoteworthy opened 1 year ago

LordNoteworthy commented 1 year ago

Is your feature request related to a problem? Please describe. I need to generate real words from a dictionary to use inside a security project. The problem with the hard-coded list in `Lorem().Text()`` that it can be easy identified as fake data

I can understand that faker's point is to generate fake data, though it will be useful to also give an option to generate more realistic fake data when it comes to strings.

Describe the solution you'd like fake.Lorem().Word(min-length?) -> "apple"

Describe alternatives you've considered Completely random slice of letters or a ransom elements of lorem texts array is not suitable for my use case.

Check out this: https://raw.githubusercontent.com/tjarratt/babble/master/babble_windows.go

We don't need to grab the whole words from the dictionary as it will increase significantly the package size, for example words under 4 letters can be dropped.

dhfherna commented 1 year ago

I have an idea using external APIs and I want to work on this issue, can you assign me?

jaswdr commented 1 year ago

@dhfherna sure, go ahead

dhfherna commented 1 year ago

Hi @jaswdr, I was reviewing the PR with my proposal to solve this issue, however, upon review I see that it did not pass the deepsource review, I identified some solutions that apply in recent versions of Go, that means that for older versions the compilation fails. In this case what can I do?