go-faker / faker

Go (Golang) Fake Data Generator for Struct, previously https://github.com/bxcodec/faker
https://pkg.go.dev/github.com/go-faker/faker/v4
MIT License
614 stars 30 forks source link

Targeting more types and fields automatically using reflect #31

Open chrisprijic opened 10 months ago

chrisprijic commented 10 months ago

Is it useful to target property names, types, and tags with new methods in this library?

E.g.

It would probably require providing different "targeting" strategies for determining faking values. I understand there'd have to be precedence for applicability too. I think each of these could be valuable, though I don't know if its considered applicable here.

I can provide some implementation/PR if this is within scope. I'm going to try things out tomorrow and come back with some more details.

snorwin commented 2 months ago

+1

(especially if you would like to fake values of a dependency where tags can't be used)