Add IgnoreFieldsExcept
Open
enhancement
- Dominant language
- Go
- Stars
- 4.7k
- Forks
- 243
- PR merge metrics
- No merged PRs in 30d
Description
For larger structs and when the API is potentially evolving it would be handy to have the inverse of `IgnoreFields`, i.e. `cmpopts.FilterFields(typ interface{}, names ...string) cmp.Option`.
And for symmetry I guess there should also be `FilterInterfaces` and `FilterTypes`.
An alternative naming could be `Include…` if this clashes to much with the root packages concept of filters.
Contributor guide
Assessment
This issue has not been assessed yet.