mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 07:26:47 +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:
@@ -69,7 +69,7 @@ func (l *LakeBTC) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets exchange configuration profile
|
||||
func (l *LakeBTC) Setup(exch config.ExchangeConfig) {
|
||||
func (l *LakeBTC) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
l.SetEnabled(false)
|
||||
} else {
|
||||
@@ -95,7 +95,7 @@ func (l *LakeBTC) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = l.SetAPIURL(&exch)
|
||||
err = l.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ func TestSetup(t *testing.T) {
|
||||
lakebtcConfig.APIKey = apiKey
|
||||
lakebtcConfig.APISecret = apiSecret
|
||||
|
||||
l.Setup(lakebtcConfig)
|
||||
l.Setup(&lakebtcConfig)
|
||||
}
|
||||
|
||||
func TestGetTradablePairs(t *testing.T) {
|
||||
|
||||
@@ -67,7 +67,7 @@ func (l *LakeBTC) UpdateTicker(p currency.Pair, assetType string) (ticker.Price,
|
||||
tickerPrice.Low = tick[currency].Low
|
||||
tickerPrice.Last = tick[currency].Last
|
||||
|
||||
err = ticker.ProcessTicker(l.GetName(), tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(l.GetName(), &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user