Skip to content

Commit d4e8e9a

Browse files
committed
Deprecate migrate's MultiError in favor of github.com/hashicorp/go-multierror
1 parent 5399892 commit d4e8e9a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

migrate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ func (m *Migrate) unlock() error {
950950
// if a prevErr is not nil.
951951
func (m *Migrate) unlockErr(prevErr error) error {
952952
if err := m.unlock(); err != nil {
953-
return NewMultiError(prevErr, err)
953+
return multierror.Append(prevErr, err)
954954
}
955955
return prevErr
956956
}

util.go

+5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ import (
88
)
99

1010
// MultiError holds multiple errors.
11+
//
12+
// Deprecated: Use github.com/hashicorp/go-multierror instead
1113
type MultiError struct {
1214
Errs []error
1315
}
1416

1517
// NewMultiError returns an error type holding multiple errors.
18+
//
19+
// Deprecated: Use github.com/hashicorp/go-multierror instead
20+
//
1621
func NewMultiError(errs ...error) MultiError {
1722
compactErrs := make([]error, 0)
1823
for _, e := range errs {

0 commit comments

Comments
 (0)