Skip to content

Commit

Permalink
Increased lint coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
cranktakular committed Feb 20, 2024
1 parent 2b5df7c commit 93d6722
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion exchanges/coinbasepro/coinbasepro_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ func (c *CoinbasePro) wsHandleData(respRaw []byte, seqCount uint64) (string, err

sliToSend := []stream.KlineData{}

timestamp, err := getTimestamp(respRaw)
var timestamp time.Time
timestamp, err = getTimestamp(respRaw)
if err != nil {
return warnString, err
}
Expand Down
5 changes: 3 additions & 2 deletions exchanges/coinbasepro/coinbasepro_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ func (c *CoinbasePro) UpdateAccountInfo(ctx context.Context, assetType asset.Ite
done bool
err error
cursor string
accountResp AllAccountsResponse
)
response.Exchange = c.Name

for !done {
accountResp, err := c.GetAllAccounts(ctx, 250, cursor)
accountResp, err = c.GetAllAccounts(ctx, 250, cursor)
if err != nil {
return response, err
}
Expand Down Expand Up @@ -411,7 +412,7 @@ func (c *CoinbasePro) UpdateOrderbook(ctx context.Context, p currency.Pair, asse
if p.IsEmpty() {
return nil, currency.ErrCurrencyPairEmpty
}
if err := c.CurrencyPairs.IsAssetEnabled(assetType); err != nil {
if err = c.CurrencyPairs.IsAssetEnabled(assetType); err != nil {

Check failure on line 415 in exchanges/coinbasepro/coinbasepro_wrapper.go

View workflow job for this annotation

GitHub Actions / lint

sloppyReassign: re-assignment to `err` can be replaced with `err := c.CurrencyPairs.IsAssetEnabled(assetType)` (gocritic)
return nil, err
}
book := &orderbook.Base{
Expand Down

0 comments on commit 93d6722

Please sign in to comment.