mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +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:
@@ -118,7 +118,7 @@ func (b *Bitfinex) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup takes in the supplied exchange configuration details and sets params
|
||||
func (b *Bitfinex) Setup(exch config.ExchangeConfig) {
|
||||
func (b *Bitfinex) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
b.SetEnabled(false)
|
||||
} else {
|
||||
@@ -145,7 +145,7 @@ func (b *Bitfinex) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = b.SetAPIURL(&exch)
|
||||
err = b.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func TestSetup(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error("Test Failed - Bitfinex Setup() init error")
|
||||
}
|
||||
b.Setup(bfxConfig)
|
||||
b.Setup(&bfxConfig)
|
||||
b.APIKey = testAPIKey
|
||||
b.APISecret = testAPISecret
|
||||
if !b.Enabled || b.AuthenticatedAPISupport || b.RESTPollingDelay != time.Duration(10) ||
|
||||
|
||||
@@ -79,7 +79,7 @@ func (b *Bitfinex) UpdateTicker(p currency.Pair, assetType string) (ticker.Price
|
||||
tick.Volume = tickerNew[x].Volume
|
||||
tick.High = tickerNew[x].High
|
||||
|
||||
err = ticker.ProcessTicker(b.Name, tick, assetType)
|
||||
err = ticker.ProcessTicker(b.Name, &tick, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user