Closed yanzhoupan closed 3 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
LGTM, I'll double check the tests in a bit because the CI integration seems to be off or not working.
LGTM, I'll double check the tests in a bit because the CI integration seems to be off or not working.
Cool! Looking forward to my first contribution to google lol
Thanks for the change!
The current
gofuzz
only support fuzzing the exported fields (i.e. the fields that start with an uppercase letter), other fields are simply filtered out according to this line.However, a lot of
struct
also contains un-exported fields (i.e. fields start with lowercase letters) and sometimes people want to do fuzzing on those structs. In this pr I fixed this problem by addingallowUnexportedFields
to the fuzzer, which allows user to decide whether they want to include unexported fields while fuzzing. It is set tofalse
by default. But it can be turned on withAllowUnexportedFields
function.Tests are also added.