Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Nov 3, 2021
1 parent 54879ba commit 6cc0264
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion dot/core/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ func (s *Service) handleBlocksAsync() {
}

s.maintainTransactionPool(block)

case <-s.ctx.Done():
return
}
Expand Down
13 changes: 9 additions & 4 deletions lib/runtime/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ func GetRuntimeBlob(testRuntimeFilePath, testRuntimeURL string) (n int64, err er
if err != nil {
return 0, err
}
defer func() {
_ = out.Close()
}()

/* #nosec */
resp, err := http.Get(testRuntimeURL)
Expand All @@ -103,7 +100,15 @@ func GetRuntimeBlob(testRuntimeFilePath, testRuntimeURL string) (n int64, err er
}()

n, err = io.Copy(out, resp.Body)
return n, err
if err != nil {
return 0, err
}

if err = out.Close(); err != nil {
return 0, err
}

return n, nil
}

// TestRuntimeNetwork ...
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fi

if ! command -v golangci-lint &> /dev/null
then
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0
fi

export PATH=$PATH:$(go env GOPATH)/bin

0 comments on commit 6cc0264

Please sign in to comment.