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

@@ -70,7 +70,7 @@ func (b *BTSE) SetDefaults() {
}
// Setup takes in the supplied exchange configuration details and sets params
func (b *BTSE) Setup(exch config.ExchangeConfig) {
func (b *BTSE) Setup(exch *config.ExchangeConfig) {
if !exch.Enabled {
b.SetEnabled(false)
} else {
@@ -97,7 +97,7 @@ func (b *BTSE) Setup(exch config.ExchangeConfig) {
if err != nil {
log.Fatal(err)
}
err = b.SetAPIURL(&exch)
err = b.SetAPIURL(exch)
if err != nil {
log.Fatal(err)
}

View File

@@ -34,7 +34,7 @@ func TestSetup(t *testing.T) {
btseConfig.APIKey = apiKey
btseConfig.APISecret = apiSecret
b.Setup(btseConfig)
b.Setup(&btseConfig)
}
func TestGetMarkets(t *testing.T) {

View File

@@ -73,7 +73,7 @@ func (b *BTSE) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, er
tickerPrice.Volume = s.Volume
tickerPrice.High = s.High
err = ticker.ProcessTicker(b.GetName(), tickerPrice, assetType)
err = ticker.ProcessTicker(b.GetName(), &tickerPrice, assetType)
if err != nil {
return tickerPrice, err
}