protobuf-go/internal/encoding
Damien Neil 01b51b4f96 proto, internal/errors: add Error sentinel, errors.Wrap
Add a sentinel proto.Error error which matches all errors returned by
packages in this module.

Document that protoregistry.NotFound is an exact sentinel value for
performance reasons.

Add a Wrap function to the internal/errors package and use it to wrap
errors from outside sources (resolvers). Wrapped errors match
proto.Error.

Fixes golang/protobuf#1021.

Change-Id: I45567df3fd6c8dc9a5caafdb55654827f6fb1941
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/215338
Reviewed-by: Joe Tsai <joetsai@google.com>
2020-02-07 21:09:48 +00:00
..
defval encoding/prototext: rewrite of internal/encoding/text 2020-02-05 02:11:08 +00:00
json internal/encoding/json: add tests for negative zeros. 2020-02-03 23:03:51 +00:00
messageset proto, internal/errors: add Error sentinel, errors.Wrap 2020-02-07 21:09:48 +00:00
pack
tag
text encoding/prototext: make unexpected EOF error into proto.Error 2020-02-07 19:00:45 +00:00
wire