mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 23:16:52 +00:00
Optimisation: Large struct pointer conversion (final part) (#265)
Completes large struct pointer optomisations over the entire codebase and enables hugeParams linter by default
This commit is contained in:
@@ -85,7 +85,7 @@ func (b *Bithumb) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup takes in the supplied exchange configuration details and sets params
|
||||
func (b *Bithumb) Setup(exch config.ExchangeConfig) {
|
||||
func (b *Bithumb) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
b.SetEnabled(false)
|
||||
} else {
|
||||
@@ -112,7 +112,7 @@ func (b *Bithumb) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = b.SetAPIURL(&exch)
|
||||
err = b.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func TestSetup(t *testing.T) {
|
||||
bitConfig.APIKey = testAPIKey
|
||||
bitConfig.APISecret = testAPISecret
|
||||
|
||||
b.Setup(bitConfig)
|
||||
b.Setup(&bitConfig)
|
||||
}
|
||||
|
||||
func TestGetTradablePairs(t *testing.T) {
|
||||
|
||||
@@ -84,7 +84,7 @@ func (b *Bithumb) UpdateTicker(p currency.Pair, assetType string) (ticker.Price,
|
||||
tp.Volume = tickers[currency].Volume1Day
|
||||
tp.High = tickers[currency].MaxPrice
|
||||
|
||||
err = ticker.ProcessTicker(b.Name, tp, assetType)
|
||||
err = ticker.ProcessTicker(b.Name, &tp, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user