mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +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:
@@ -84,7 +84,7 @@ func (h *HitBTC) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets user exchange configuration settings
|
||||
func (h *HitBTC) Setup(exch config.ExchangeConfig) {
|
||||
func (h *HitBTC) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
h.SetEnabled(false)
|
||||
} else {
|
||||
@@ -111,7 +111,7 @@ func (h *HitBTC) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = h.SetAPIURL(&exch)
|
||||
err = h.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ func TestSetup(t *testing.T) {
|
||||
hitbtcConfig.APIKey = apiKey
|
||||
hitbtcConfig.APISecret = apiSecret
|
||||
|
||||
h.Setup(hitbtcConfig)
|
||||
h.Setup(&hitbtcConfig)
|
||||
}
|
||||
|
||||
func TestGetOrderbook(t *testing.T) {
|
||||
|
||||
@@ -91,7 +91,7 @@ func (h *HitBTC) UpdateTicker(currencyPair currency.Pair, assetType string) (tic
|
||||
tp.Low = tick[curr].Low
|
||||
tp.Volume = tick[curr].Volume
|
||||
|
||||
err = ticker.ProcessTicker(h.GetName(), tp, assetType)
|
||||
err = ticker.ProcessTicker(h.GetName(), &tp, assetType)
|
||||
if err != nil {
|
||||
return ticker.Price{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user