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

feat: huobi ws provider #49

Merged
merged 11 commits into from
Jan 29, 2024
Merged

feat: huobi ws provider #49

merged 11 commits into from
Jan 29, 2024

Conversation

aljo242
Copy link
Contributor

@aljo242 aljo242 commented Jan 26, 2024

Closes BLO-736

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (93905b9) 73.72% compared to head (f0ef4f4) 73.92%.

Files Patch % Lines
providers/websockets/huobi/ws_data_handler.go 76.31% 13 Missing and 5 partials ⚠️
providers/websockets/huobi/parse.go 85.71% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   73.72%   73.92%   +0.19%     
==========================================
  Files         119      122       +3     
  Lines        6277     6404     +127     
==========================================
+ Hits         4628     4734     +106     
- Misses       1353     1368      +15     
- Partials      296      302       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +73 to +78
reader, err := gzip.NewReader(bytes.NewReader(message))
if err != nil {
h.logger.Error("error creating gzip reader", zap.Error(err))
return resp, nil, err
}
defer reader.Close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the defer need to happen before the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is an error, the reader that will be returned is nil

Copy link
Contributor

@davidterpay davidterpay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, would add the test case for pongs

@aljo242 aljo242 merged commit 262113b into main Jan 29, 2024
@aljo242 aljo242 deleted the feat/huobi-ws branch January 29, 2024 14:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants