mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 15:11:07 +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:
@@ -92,7 +92,7 @@ func (c *CoinbasePro) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup initialises the exchange parameters with the current configuration
|
||||
func (c *CoinbasePro) Setup(exch config.ExchangeConfig) {
|
||||
func (c *CoinbasePro) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
c.SetEnabled(false)
|
||||
} else {
|
||||
@@ -122,7 +122,7 @@ func (c *CoinbasePro) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = c.SetAPIURL(&exch)
|
||||
err = c.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func TestSetup(t *testing.T) {
|
||||
gdxConfig.APIKey = apiKey
|
||||
gdxConfig.APISecret = apiSecret
|
||||
gdxConfig.AuthenticatedAPISupport = true
|
||||
c.Setup(gdxConfig)
|
||||
c.Setup(&gdxConfig)
|
||||
}
|
||||
|
||||
func TestGetProducts(t *testing.T) {
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *CoinbasePro) UpdateTicker(p currency.Pair, assetType string) (ticker.Pr
|
||||
tickerPrice.High = stats.High
|
||||
tickerPrice.Low = stats.Low
|
||||
|
||||
err = ticker.ProcessTicker(c.GetName(), tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(c.GetName(), &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user