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:
44 files changed
+114
-109
No files matched your search
+1
-1
@@ -3,6 +3,7 @@ package lnwire
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"image/color"
|
||||
"io"
|
||||
@@ -13,7 +14,6 @@ import (
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/lightningnetwork/lnd/tor"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/tlv"
|
||||
)
|
||||
@@ -1513,7 +1512,7 @@ func makeEmptyOnionError(code FailCode) (FailureMessage, error) {
|
||||
return &FailInvalidBlinding{}, nil
|
||||
|
||||
default:
|
||||
return nil, errors.Errorf("unknown error code: %v", code)
|
||||
return nil, fmt.Errorf("unknown error code: %v", code)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user