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

Compatible with interface{} #65

Open
c625473164 opened this issue Mar 28, 2019 · 2 comments
Open

Compatible with interface{} #65

c625473164 opened this issue Mar 28, 2019 · 2 comments

Comments

@c625473164
Copy link

If meet some fields which not supported such as interface{}, Can we just ignore the err.
For example

struct Test{
A  int
B string
C interface{}
}

I only want A, B filed, just give me C with a nil value

@bxcodec
Copy link
Owner

bxcodec commented Mar 28, 2019

I don't think it's will be good.
If you want to ignore the interface, maybe you can add the skip tag.

struct Test{
A  int
B string
C interface{} `faker:"-"`
}

@c625473164
Copy link
Author

the struct is sometimes generated by thrift or other tools such as protobuf, so it's not so convenient to add tags

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

2 participants