planetscale / planetscale/vtprotobuf
Support DiscardUnknown fields with UnmarshalVT
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
https://pkg.go.dev/google.golang.org/protobuf/proto#UnmarshalOptions
Currently UnmarshalVT tracks unknownFields:
default:
iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) <----
iNdEx += skippy
It would be helpful to have an option to discard these.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the UnmarshalVT entry point and the unknownFields handling shown in the issue, then read the linked protobuf UnmarshalOptions documentation. Done means UnmarshalVT supports an option that discards unknown fields instead of retaining them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100