diff --git a/migrate.go b/migrate.go index a4a694b..3ede504 100644 --- a/migrate.go +++ b/migrate.go @@ -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 } diff --git a/util.go b/util.go index 4aeb0f2..1cef03c 100644 --- a/util.go +++ b/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 {