Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Faker generating empty slices #124

Closed
nphmuller opened this issue Oct 30, 2020 · 1 comment
Closed

Faker generating empty slices #124

nphmuller opened this issue Oct 30, 2020 · 1 comment

Comments

@nphmuller
Copy link

With enough tries Faker generates at least a couple of empty sizes. I believe using the default settings this is unintentional, right?

Repro:

	for i := 0; i < 1000; i++ {
		var randomSlice []string
		faker.FakeData(&randomSlice)
		if len(randomSlice) == 0 {
			fmt.Println("OH NO!")
		}
	}

Or: https://play.golang.org/p/IHpHR6x8IAM

@nphmuller
Copy link
Author

Nevermind, seems intentional.

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

No branches or pull requests

1 participant