mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
multi: use the "errors" package everywhere
Replace all usages of the "github.com/go-errors/errors" and "github.com/pkg/errors" packages with the standard lib's "errors" package. This ensures that error wrapping and `errors.Is` checks will work as expected.
This commit is contained in:
@@ -2,10 +2,11 @@ package channeldb
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/btcsuite/btcwallet/walletdb"
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/lightningnetwork/lnd/kvdb"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -48,7 +49,7 @@ func applyMigration(t *testing.T, beforeMigration, afterMigration func(d *DB),
|
||||
if dryRun && r != ErrDryRunMigrationOK {
|
||||
t.Fatalf("expected dry run migration OK")
|
||||
}
|
||||
err = errors.New(r)
|
||||
err = fmt.Errorf("%v", r)
|
||||
}
|
||||
|
||||
if err == nil && shouldFail {
|
||||
|
Reference in New Issue
Block a user