mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 15:10:42 +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:
@@ -77,7 +77,7 @@ func (e *EXMO) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup takes in the supplied exchange configuration details and sets params
|
||||
func (e *EXMO) Setup(exch config.ExchangeConfig) {
|
||||
func (e *EXMO) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
e.SetEnabled(false)
|
||||
} else {
|
||||
@@ -103,7 +103,7 @@ func (e *EXMO) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = e.SetAPIURL(&exch)
|
||||
err = e.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func TestSetup(t *testing.T) {
|
||||
exmoConf.APIKey = APIKey
|
||||
exmoConf.APISecret = APISecret
|
||||
|
||||
e.Setup(exmoConf)
|
||||
e.Setup(&exmoConf)
|
||||
|
||||
e.AuthenticatedAPISupport = true
|
||||
e.APIKey = APIKey
|
||||
|
||||
@@ -79,7 +79,7 @@ func (e *EXMO) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, er
|
||||
tickerPrice.Low = result[currency].Low
|
||||
tickerPrice.Volume = result[currency].Volume
|
||||
|
||||
err = ticker.ProcessTicker(e.Name, tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(e.Name, &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user