golang / protobuf

Go support for Google's protocol buffers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AllowErrors option for UnmarshalOptions

ekubyshin opened this issue · comments

Is your feature request related to a problem? Please describe.
I have a message like

message Request {
      repeated Event = 1;
}
message Event {
     optional int64 someField = 1;
     int64 otherField = 2;
}

If there're several events in the request and if one of them have an error, for instance in someField, the request will be failed.
But it would be better, to have an option to ignore fields with errors, like AllowPartial and DiscurdUnknown options in UnmarshallOptions.

Describe the solution you'd like
Check this pull request protocolbuffers/protobuf-go#29

This is kind of a complicated process. Let’s presume that the stream loses a byte from the data. At this point all data following that lost bit is going to be garbage. This is part of the trouble with a non-self-correcting encoding.

You are right. I have to send this issue to the protobuf-go team instead

This is the issue board for the protobuf-go project as well. In fact that repo doesn’t even have an Issues tab, because issues are handled here.