Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit b72f9cf

Browse files
committed
[FABG-700] fix typoes and imports
Change-Id: I1ed71dbabe69763606897bfb9003edccaddd1749 Signed-off-by: ping40 <norberthu30@gmail.com>
1 parent fa73e44 commit b72f9cf

File tree

8 files changed

+14
-17
lines changed

8 files changed

+14
-17
lines changed

pkg/client/msp/client_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ package msp
88

99
import (
1010
"errors"
11+
"fmt"
1112
"math/rand"
1213
"net"
14+
"os"
1315
"strconv"
1416
"strings"
1517
"testing"
1618

17-
"fmt"
18-
"os"
19-
2019
contextApi "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context"
2120
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/core"
2221
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/msp"

pkg/fab/channel/transactor.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ SPDX-License-Identifier: Apache-2.0
77
package channel
88

99
import (
10+
reqContext "context"
1011
"strings"
1112

1213
"github.com/pkg/errors"
1314

1415
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context"
1516
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
16-
17-
reqContext "context"
18-
1917
contextImpl "github.com/hyperledger/fabric-sdk-go/pkg/context"
2018
"github.com/hyperledger/fabric-sdk-go/pkg/core/config/endpoint"
2119
"github.com/hyperledger/fabric-sdk-go/pkg/fab/txn"

pkg/fab/channel/transactor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ package channel
88

99
import (
1010
"testing"
11-
1211
"time"
1312

13+
"github.com/stretchr/testify/assert"
14+
1415
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/core"
1516
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
1617
"github.com/hyperledger/fabric-sdk-go/pkg/context"
@@ -21,7 +22,6 @@ import (
2122
"github.com/hyperledger/fabric-sdk-go/pkg/fab/mocks"
2223
"github.com/hyperledger/fabric-sdk-go/pkg/fab/txn"
2324
mspmocks "github.com/hyperledger/fabric-sdk-go/pkg/msp/test/mockmsp"
24-
"github.com/stretchr/testify/assert"
2525
)
2626

2727
func TestCreateTxnID(t *testing.T) {

pkg/fab/events/endpoint/endpoint.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import (
1010
"crypto/x509"
1111

1212
"github.com/hyperledger/fabric-sdk-go/pkg/common/options"
13-
"github.com/hyperledger/fabric-sdk-go/pkg/fab/comm"
14-
1513
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
14+
"github.com/hyperledger/fabric-sdk-go/pkg/fab/comm"
1615
)
1716

1817
// EventEndpoint extends a Peer endpoint and provides the

pkg/fab/events/endpoint/endpoint_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ import (
1010
"testing"
1111
"time"
1212

13+
"github.com/stretchr/testify/assert"
14+
1315
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
1416
clientmocks "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/client/mocks"
1517
fabmocks "github.com/hyperledger/fabric-sdk-go/pkg/fab/mocks"
1618
mspmocks "github.com/hyperledger/fabric-sdk-go/pkg/msp/test/mockmsp"
1719
"github.com/hyperledger/fabric-sdk-go/pkg/util/test"
18-
"github.com/stretchr/testify/assert"
1920
)
2021

2122
const (

pkg/fab/events/endpoint/endpointdiscovery.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ SPDX-License-Identifier: Apache-2.0
77
package endpoint
88

99
import (
10+
"github.com/pkg/errors"
11+
1012
"github.com/hyperledger/fabric-sdk-go/pkg/client/common/discovery"
1113
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
1214
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/context"
1315
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab"
14-
"github.com/pkg/errors"
1516
)
1617

1718
var logger = logging.NewLogger("fabsdk/fab")
1819

19-
// DiscoveryWrapper wraps a target discovery service and and adds endpoint data to each
20+
// DiscoveryWrapper wraps a target discovery service and adds endpoint data to each
2021
// of the discovered peers.
2122
type DiscoveryWrapper struct {
2223
fab.DiscoveryService

pkg/fabsdk/provider/chpvdr/cachekey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (k *cacheKey) String() string {
4747
return k.key
4848
}
4949

50-
// cacheKey holds a key for the provider cache
50+
// eventCacheKey holds a key for the provider cache
5151
type eventCacheKey struct {
5252
cacheKey
5353
opts []options.Opt

pkg/msp/test/mockmsp/mockfabriccaserver.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ package mockmsp
99
import (
1010
"net"
1111
"net/http"
12-
1312
"time"
1413

15-
cfapi "github.com/cloudflare/cfssl/api"
1614
cfsslapi "github.com/cloudflare/cfssl/api"
15+
1716
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/api"
1817
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/util"
1918
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
@@ -143,7 +142,7 @@ func (s *MockFabricCAServer) enroll(w http.ResponseWriter, req *http.Request) {
143142
}
144143
resp := &enrollmentResponseNet{Cert: util.B64Encode([]byte(ecert))}
145144
fillCAInfo(&resp.ServerInfo)
146-
if err := cfapi.SendResponse(w, resp); err != nil {
145+
if err := cfsslapi.SendResponse(w, resp); err != nil {
147146
logger.Error(err)
148147
}
149148
}

0 commit comments

Comments
 (0)