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:
Andrew
2019-04-04 15:31:49 +11:00
committed by Adrian Gallagher
parent 107cf76373
commit ca55f2f965
97 changed files with 195 additions and 195 deletions

View File

@@ -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)
}

View File

@@ -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) {

View File

@@ -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
}