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

Unified Diff: common/errors/multierror.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 | « common/errors/annotate_test.go ('k') | common/errors/tags.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/errors/multierror.go
diff --git a/common/errors/multierror.go b/common/errors/multierror.go
index 976f08ef007c926c5cb54653ec13581f2c37c255..18e6ee9c7a31b019b9b57a360f8774a831664ad2 100644
--- a/common/errors/multierror.go
+++ b/common/errors/multierror.go
@@ -52,11 +52,8 @@ func (m MultiError) stackContext() stackContext {
n, _ := m.Summary()
return stackContext{
- internalReason: "MultiError %(non-nil)d/%(total)d: following first non-nil error.",
- data: Data{
- "non-nil": {Value: n},
- "total": {Value: len(m)},
- },
+ internalReason: fmt.Sprintf(
+ "MultiError %d/%d: following first non-nil error.", n, len(m)),
}
}
« no previous file with comments | « common/errors/annotate_test.go ('k') | common/errors/tags.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698