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:
Elle Mouton
2025-06-30 08:46:50 +02:00
committed by Oliver Gugger
parent 72d4ae0faa
commit 9b877b94c3
44 changed files with 114 additions and 109 deletions

View File

@@ -1,9 +1,9 @@
package migration_01_to_11
import (
"fmt"
"testing"
"github.com/go-errors/errors"
"github.com/lightningnetwork/lnd/kvdb"
)
@@ -33,7 +33,7 @@ func applyMigration(t *testing.T, beforeMigration, afterMigration func(d *DB),
defer func() {
if r := recover(); r != nil {
err = errors.New(r)
err = fmt.Errorf("%v", r)
}
if err == nil && shouldFail {

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"crypto/sha256"
"encoding/binary"
"errors"
"fmt"
"math/rand"
"reflect"
@@ -12,7 +13,6 @@ import (
"github.com/btcsuite/btcd/btcutil"
"github.com/davecgh/go-spew/spew"
"github.com/go-errors/errors"
lnwire "github.com/lightningnetwork/lnd/channeldb/migration/lnwire21"
"github.com/lightningnetwork/lnd/kvdb"
"github.com/lightningnetwork/lnd/lntypes"