Skip to content

Commit

Permalink
[FAB-8004] Remove errors wrapper
Browse files Browse the repository at this point in the history
Change-Id: If9ab693dc0c2f5f29720e41e214d4ebaee290037
Signed-off-by: Troy Ronda <troy@troyronda.com>
  • Loading branch information
troyronda committed Feb 2, 2018
1 parent a0a9430 commit cb5e581
Show file tree
Hide file tree
Showing 96 changed files with 97 additions and 261 deletions.
2 changes: 1 addition & 1 deletion api/apiconfig/mocks/mockconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/golang/mock/gomock"
"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

// GoodCert is a mock of a good certificate
Expand Down
2 changes: 1 addition & 1 deletion api/apiconfig/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"encoding/pem"
"io/ioutil"

"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/pkg/errors/status"
"github.com/pkg/errors"
)

// NetworkConfig provides a static definition of a Hyperledger Fabric network
Expand Down
4 changes: 2 additions & 2 deletions internal/github.com/hyperledger/fabric-ca/lib/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ import (
"strconv"
"strings"

"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"

cfsslapi "github.com/cloudflare/cfssl/api"
"github.com/cloudflare/cfssl/csr"
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/api"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/tls"
log "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/logbridge"
Expand Down
4 changes: 2 additions & 2 deletions internal/github.com/hyperledger/fabric-ca/lib/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ package lib
import (
"net/http"

"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"

"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/api"
log "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/logbridge"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util"
Expand Down
4 changes: 2 additions & 2 deletions internal/github.com/hyperledger/fabric-ca/lib/tls/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"io/ioutil"
"time"

"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"

"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
factory "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/cryptosuitebridge"
log "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/logbridge"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util"
Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric-ca/lib/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"encoding/pem"
"net/http"

"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"

"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/github.com/hyperledger/fabric-ca/util/csp.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
"io/ioutil"
"strings"

"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"

"github.com/cloudflare/cfssl/csr"
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
factory "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/cryptosuitebridge"
log "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/logbridge"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric-ca/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
factory "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/cryptosuitebridge"

"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"

"golang.org/x/crypto/ocsp"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/pkcs11"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package sw
import (
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/sw"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/utils"
flogging "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/miekg/pkcs11"
"github.com/pkg/errors"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"

"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/utils"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

// bccspCryptoSigner is the BCCSP-based implementation of a crypto.Signer
Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric/bccsp/sw/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp"
flogging "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
"golang.org/x/crypto/sha3"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric/msp/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"time"

utils "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/cryptosuitebridge"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

type validity struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric/msp/identities.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
bccsp "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/cryptosuitebridge"
flogging "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge"
logging "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp"
"github.com/pkg/errors"
)

var mspIdentityLogger = flogging.MustGetLogger("msp/identity")
Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric/msp/mspimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
factory "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/cryptosuitebridge"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
m "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp"
"github.com/pkg/errors"
)

// mspSetupFuncType is the prototype of the setup function
Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric/msp/mspimplsetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (

"github.com/golang/protobuf/proto"
bccsp "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/cryptosuitebridge"
errors "github.com/hyperledger/fabric-sdk-go/pkg/errors"
m "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp"
errors "github.com/pkg/errors"
)

func (msp *bccspmsp) getCertifiersIdentifier(certRaw []byte) ([]byte, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"math/big"
"reflect"

"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

func (msp *bccspmsp) validateIdentity(id *identity) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/github.com/hyperledger/fabric/msp/mspmgrimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ package msp
import (
"github.com/golang/protobuf/proto"
flogging "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/sdkpatch/logbridge"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/msp"
"github.com/pkg/errors"
)

var mspLogger = flogging.MustGetLogger("msp")
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/comm/comm.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
cutil "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

// TLSConfig returns the appropriate config for TLS including the root CAs,
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apilogging"
"github.com/hyperledger/fabric-sdk-go/pkg/config/cryptoutil"
"github.com/hyperledger/fabric-sdk-go/pkg/config/urlutil"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/pkg/logging"
lu "github.com/hyperledger/fabric-sdk-go/pkg/logging/utils"
"github.com/pkg/errors"

cs "github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"reflect"

api "github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/pkg/logging"
"github.com/pkg/errors"
"github.com/spf13/viper"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/cryptoutil/cryptoutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"io"

"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/pkg/logging"
"github.com/pkg/errors"

factory "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/sdkpatch/cryptosuitebridge"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cryptosuite/bccsp/multisuite/cryptosuiteimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/pkcs11"
"github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/sw"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/pkg/errors"
)

//GetSuiteByConfig returns cryptosuite adaptor for bccsp loaded according to given config
Expand Down
2 changes: 1 addition & 1 deletion pkg/cryptosuite/bccsp/pkcs11/cryptosuiteimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
bccspPkcs11 "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/factory/pkcs11"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/pkcs11"
"github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/wrapper"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/pkg/logging"
"github.com/pkg/errors"
)

var logger = logging.NewLogger("fabric_sdk_go")
Expand Down
2 changes: 1 addition & 1 deletion pkg/cryptosuite/bccsp/sw/cryptosuiteimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp"
bccspSw "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/factory/sw"
"github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/wrapper"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
"github.com/hyperledger/fabric-sdk-go/pkg/logging"
"github.com/pkg/errors"
)

var logger = logging.NewLogger("fabric_sdk_go")
Expand Down
49 changes: 0 additions & 49 deletions pkg/errors/errors.go

This file was deleted.

Loading

0 comments on commit cb5e581

Please sign in to comment.