With Go 1.27's new generic methods, it would be possible to add a method variant of those four functions, which I think is much nicer to use.
Example:
var fake = faker.New()
// Instead of
v1 := faker.RandomElement(fake, 1, 2, 3, 4, 5)
// We could do this, much more natural in my opinion
v2 := fake.RandomElement(1, 2, 3, 4, 5)
This can be done while keeping compatibility with Go 1.22, by using conditional build tags.
If this something that you would be interested in? If so, I'd be more than happy to open a PR.
With Go 1.27's new generic methods, it would be possible to add a method variant of those four functions, which I think is much nicer to use.
Example:
This can be done while keeping compatibility with Go 1.22, by using conditional build tags.
If this something that you would be interested in? If so, I'd be more than happy to open a PR.