Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: grpc/grpcutil/errors.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/tools/dmtool/vizQuery.go ('k') | grpc/prpc/client.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grpc/grpcutil/errors.go
diff --git a/grpc/grpcutil/errors.go b/grpc/grpcutil/errors.go
index e34f3216a004f95904eaa54abe83ec1a9afdac76..e589ac37091e91ae273b39e674486843be2985b8 100644
--- a/grpc/grpcutil/errors.go
+++ b/grpc/grpcutil/errors.go
@@ -89,7 +89,9 @@ func WrapIfTransient(err error) error {
type grpcCodeTag struct{ Key errors.TagKey }
-func (g grpcCodeTag) With(code codes.Code) errors.TagValue { return errors.MkTagValue(g.Key, code) }
+func (g grpcCodeTag) With(code codes.Code) errors.TagValue {
+ return errors.TagValue{Key: g.Key, Value: code}
+}
func (g grpcCodeTag) In(err error) (v codes.Code, ok bool) {
d, ok := errors.TagValueIn(g.Key, err)
if ok {
« no previous file with comments | « dm/tools/dmtool/vizQuery.go ('k') | grpc/prpc/client.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698