Skip to content

Commit

Permalink
[FABG-843] update to golangci-lint v1.16.0
Browse files Browse the repository at this point in the history
This change updates the linter tool version and resolves newly
found linter errors.

Change-Id: Ibf36d72d398e14b4bc150a309849409b86afc277
Signed-off-by: Troy Ronda <[email protected]>
  • Loading branch information
troyronda committed Apr 3, 2019
1 parent 37a26c6 commit ca2a7a3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FABRIC_SDKGO_TEST_CHANGED ?= false
FABRIC_SDKGO_TESTRUN_ID ?= $(shell date +'%Y%m%d%H%M%S')

# Dev tool versions (overridable)
GOLANGCI_LINT_VER ?= v1.15.0
GOLANGCI_LINT_VER ?= v1.16.0

# Fabric tool versions (overridable)
FABRIC_TOOLS_VERSION ?= $(FABRIC_STABLE_VERSION)
Expand Down
4 changes: 2 additions & 2 deletions pkg/fab/events/mocks/mockdelserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (s *MockDeliverServer) Deliver(srv pb.Deliver_DeliverServer) error {
if err1 != nil {
return err1
}
if err == io.EOF || envelope == nil {
if err == io.EOF {
test.Logf("*** mockdelserver err is io.EOF or envelope == nil, disconnecting from Deliver..")
disconnect <- true
break
Expand Down Expand Up @@ -162,7 +162,7 @@ func (s *MockDeliverServer) DeliverFiltered(srv pb.Deliver_DeliverFilteredServer
if err1 != nil {
return err1
}
if err == io.EOF || envelope == nil {
if err == io.EOF {
test.Logf("*** mockdelserver err is io.EOF or envelope == nil, disconnecting from DeliverFiltered..")
disconnect <- true
break
Expand Down
11 changes: 0 additions & 11 deletions pkg/fab/keyvaluestore/filekeyvaluestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,6 @@ func (fkvs *FileKeyValueStore) Store(key interface{}, value interface{}) error {
if err != nil {
return err
}
if value == nil {
_, err1 := os.Stat(file)
if err1 != nil {
if !os.IsNotExist(err1) {
return errors.Wrapf(err, "stat dir failed")
}
// Doesn't exist, OK
return nil
}
return os.Remove(file)
}
valueBytes, err := fkvs.marshaller(value)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion pkg/fab/mocks/mockbroadcastserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (m *MockBroadcastServer) mockBlockDelivery(payload []byte) error {
return err
}
// if payload is empty, then no need to broadcast to block DeliveryServer
if pl == nil || pl.Header == nil {
if pl.Header == nil {
return nil
}
chdr := &common.ChannelHeader{}
Expand Down

0 comments on commit ca2a7a3

Please sign in to comment.