You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
I love faker and I use it a lot on my tests. Something like this:
type User struct {
Id uint64 `faker:"-"`
Email string
Username string
FirstName string
LastName string
}
user := User{Username: "John"}
faker.FakeData(&user) // I want all fake data except for `Username` because it was set manually
In practice, I want the faker:"keep" tag always. I don't know if also other users have this need. But for me, the keep tag should be the default behavior. This is also the default behavior for gems like FactoryBot for Ruby. So what I propose is to remove the keep tag and add a new one with the opposite effect, something like replace. Or a global configuration (faker.EnableKeepDefaultBehaviour())
What do you think guys?
The text was updated successfully, but these errors were encountered:
I love faker and I use it a lot on my tests. Something like this:
In practice, I want the
faker:"keep"
tag always. I don't know if also other users have this need. But for me, thekeep
tag should be the default behavior. This is also the default behavior for gems like FactoryBot for Ruby. So what I propose is to remove the keep tag and add a new one with the opposite effect, something likereplace
. Or a global configuration (faker.EnableKeepDefaultBehaviour()
)What do you think guys?
The text was updated successfully, but these errors were encountered: