mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 23:16:54 +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:
@@ -76,7 +76,7 @@ func (a *ANX) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup is run on startup to setup exchange with config values
|
||||
func (a *ANX) Setup(exch config.ExchangeConfig) {
|
||||
func (a *ANX) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
a.SetEnabled(false)
|
||||
} else {
|
||||
@@ -102,7 +102,7 @@ func (a *ANX) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = a.SetAPIURL(&exch)
|
||||
err = a.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func TestSetup(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error("Test Failed - ANX Setup() init error")
|
||||
}
|
||||
a.Setup(anxConfig)
|
||||
a.Setup(&anxConfig)
|
||||
a.APIKey = testAPIKey
|
||||
a.APISecret = testAPISecret
|
||||
a.AuthenticatedAPISupport = true
|
||||
|
||||
@@ -150,7 +150,7 @@ func (a *ANX) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, err
|
||||
tickerPrice.High = 0
|
||||
}
|
||||
|
||||
err = ticker.ProcessTicker(a.GetName(), tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(a.GetName(), &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user