mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 07:26:46 +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 (i *ItBit) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets the exchange parameters from exchange config
|
||||
func (i *ItBit) Setup(exch config.ExchangeConfig) {
|
||||
func (i *ItBit) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
i.SetEnabled(false)
|
||||
} else {
|
||||
@@ -95,7 +95,7 @@ func (i *ItBit) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = i.SetAPIURL(&exch)
|
||||
err = i.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ func TestSetup(t *testing.T) {
|
||||
itbitConfig.APISecret = apiSecret
|
||||
itbitConfig.ClientID = clientID
|
||||
|
||||
i.Setup(itbitConfig)
|
||||
i.Setup(&itbitConfig)
|
||||
}
|
||||
|
||||
func TestGetTicker(t *testing.T) {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (i *ItBit) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, e
|
||||
tickerPrice.Low = tick.Low24h
|
||||
tickerPrice.Volume = tick.Volume24h
|
||||
|
||||
err = ticker.ProcessTicker(i.GetName(), tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(i.GetName(), &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user