gocryptotrader
gocryptotrader copied to clipboard
exchanges: shift GetDefaultConfig wrapper function to exchange.go
PR Description
Shifts GetDefaultConfig
wrapper function to exchange.go
Mitigates potential issue when its called in a wrapper test and overwrites memory after initial SetDefault
method func is called.
Also RMs a bunch of code wrapper side which is nice but its signature is a tad janky. Optionally we can disconnect it as a method and just have an exported function.
Type of change
Please delete options that are not relevant and add an x
in []
as item is complete.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
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.
- [ ] go test ./... -race
- [ ] golangci-lint run
- [ ] Test X
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally and on Github Actions with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Codecov Report
Attention: Patch coverage is 66.66667%
with 10 lines
in your changes are missing coverage. Please review.
Project coverage is 35.96%. Comparing base (
d679a76
) to head (bbd1f09
). Report is 8 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1472 +/- ##
==========================================
+ Coverage 35.89% 35.96% +0.06%
==========================================
Files 411 411
Lines 177595 177227 -368
==========================================
- Hits 63752 63734 -18
+ Misses 106058 105705 -353
- Partials 7785 7788 +3
Files | Coverage Δ | |
---|---|---|
backtester/engine/live.go | 83.08% <100.00%> (+0.20%) |
:arrow_up: |
backtester/engine/setup.go | 57.84% <100.00%> (ø) |
|
engine/helpers.go | 80.10% <100.00%> (ø) |
|
exchanges/alphapoint/alphapoint_wrapper.go | 23.64% <ø> (+0.29%) |
:arrow_up: |
exchanges/binance/binance_wrapper.go | 38.45% <ø> (+0.23%) |
:arrow_up: |
exchanges/binanceus/binanceus_wrapper.go | 40.90% <ø> (+0.83%) |
:arrow_up: |
exchanges/bitfinex/bitfinex_wrapper.go | 37.16% <ø> (+0.58%) |
:arrow_up: |
exchanges/bitflyer/bitflyer_wrapper.go | 35.66% <ø> (+1.80%) |
:arrow_up: |
exchanges/bithumb/bithumb_wrapper.go | 38.61% <ø> (+0.92%) |
:arrow_up: |
exchanges/bitmex/bitmex_wrapper.go | 44.67% <ø> (-0.54%) |
:arrow_down: |
... and 21 more |