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

Unified Diff: go/src/infra/libs/errors/multierror.go

Issue 1153883002: go: infra/libs/* now live in luci-go. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: move the rest too Created 5 years, 7 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 | « go/src/infra/libs/errors/errors_test.go ('k') | go/src/infra/libs/funnybase/binary_vals_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/libs/errors/multierror.go
diff --git a/go/src/infra/libs/errors/multierror.go b/go/src/infra/libs/errors/multierror.go
deleted file mode 100644
index 30473250dc7ca7bda89d529523eb4472a6c86a6f..0000000000000000000000000000000000000000
--- a/go/src/infra/libs/errors/multierror.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package errors
-
-import (
- "fmt"
-)
-
-// MultiError is a simple `error` implementation which represents multiple
-// `error` objects in one.
-type MultiError []error
-
-// MultiErrorFromErrors takes an error-channel, blocks on it, and returns
-// a MultiError for any errors pushed to it over the channel, or nil if
-// all the errors were nil.
-func MultiErrorFromErrors(ch <-chan error) error {
- if ch == nil {
- return nil
- }
- ret := MultiError(nil)
- for e := range ch {
- if e == nil {
- continue
- }
- ret = append(ret, e)
- }
- if len(ret) == 0 {
- return nil
- }
- return ret
-}
-
-func (m MultiError) Error() string {
- return fmt.Sprintf("%+q", []error(m))
-}
« no previous file with comments | « go/src/infra/libs/errors/errors_test.go ('k') | go/src/infra/libs/funnybase/binary_vals_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698