This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 148
support user-supplied types #1
Comments
Can you provide some of explanation, please ? Some example, or something. Currently, For example : type Another struct {
Other string
}
type Something struct {
Another
SomeField int
}
type Sample struct {
SampleID int
SomethingObj Something
} |
How about an interface? Check for this interface when encountering structs and if it's implemented, call Fake. type Faker interface {
// Fake your own struct.
Fake() error
} Mail addresses or phone numbers are good examples because they should look a certain way. type Mail string
func (m *Mail) Fake() error {
m = "random@implementation.here"
return nil
} |
@nochso |
Merged
Add new function here #5 Still need more example of data that already has a fixed pattern. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
No description provided.
The text was updated successfully, but these errors were encountered: