mirror of
https://github.com/status-im/migrate.git
synced 2025-02-23 08:18:07 +00:00
Deprecate migrate's MultiError in favor of github.com/hashicorp/go-multierror
This commit is contained in:
parent
5399892051
commit
d4e8e9ac07
@ -950,7 +950,7 @@ func (m *Migrate) unlock() error {
|
||||
// if a prevErr is not nil.
|
||||
func (m *Migrate) unlockErr(prevErr error) error {
|
||||
if err := m.unlock(); err != nil {
|
||||
return NewMultiError(prevErr, err)
|
||||
return multierror.Append(prevErr, err)
|
||||
}
|
||||
return prevErr
|
||||
}
|
||||
|
5
util.go
5
util.go
@ -8,11 +8,16 @@ import (
|
||||
)
|
||||
|
||||
// MultiError holds multiple errors.
|
||||
//
|
||||
// Deprecated: Use github.com/hashicorp/go-multierror instead
|
||||
type MultiError struct {
|
||||
Errs []error
|
||||
}
|
||||
|
||||
// NewMultiError returns an error type holding multiple errors.
|
||||
//
|
||||
// Deprecated: Use github.com/hashicorp/go-multierror instead
|
||||
//
|
||||
func NewMultiError(errs ...error) MultiError {
|
||||
compactErrs := make([]error, 0)
|
||||
for _, e := range errs {
|
||||
|
Loading…
x
Reference in New Issue
Block a user