thrasher-corp / gocryptotrader

A cryptocurrency trading bot and framework supporting multiple exchanges written in Golang.
MIT License
2.99k stars 802 forks source link

Websocket: Simplify the connectionMonitor #1502

Open Beadko opened 6 months ago

Beadko commented 6 months ago

PR Description

Currently, the WebSocket connectionMonitor is adding concurrency within the function. According to google styleguide, the caller should add the concurrency to the function.

Fixes # (issue)

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and also consider improving test coverage whilst working on a certain feature or package.

Checklist

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 37.74%. Comparing base (d518993) to head (ba36511). Report is 42 commits behind head on master.

:exclamation: Current head ba36511 differs from pull request most recent head 0ce5d4b

Please upload reports for the commit 0ce5d4b to get more accurate results.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1502/graphs/tree.svg?width=650&height=150&src=pr&token=41784B23TS&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1502?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) ```diff @@ Coverage Diff @@ ## master #1502 +/- ## ========================================== - Coverage 37.75% 37.74% -0.02% ========================================== Files 411 411 Lines 147817 147804 -13 ========================================== - Hits 55815 55794 -21 - Misses 84218 84219 +1 - Partials 7784 7791 +7 ``` | [Files](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1502?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp) | Coverage Δ | | |---|---|---| | [exchanges/stream/websocket.go](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1502?src=pr&el=tree&filepath=exchanges%2Fstream%2Fwebsocket.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp#diff-ZXhjaGFuZ2VzL3N0cmVhbS93ZWJzb2NrZXQuZ28=) | `87.19% <66.66%> (+1.14%)` | :arrow_up: | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/thrasher-corp/gocryptotrader/pull/1502/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thrasher-corp)