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:
@@ -89,7 +89,7 @@ func (b *Bittrex) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup method sets current configuration details if enabled
|
||||
func (b *Bittrex) Setup(exch config.ExchangeConfig) {
|
||||
func (b *Bittrex) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
b.SetEnabled(false)
|
||||
} else {
|
||||
@@ -115,7 +115,7 @@ func (b *Bittrex) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = b.SetAPIURL(&exch)
|
||||
err = b.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func TestSetup(t *testing.T) {
|
||||
bConfig.APISecret = apiSecret
|
||||
bConfig.AuthenticatedAPISupport = true
|
||||
|
||||
b.Setup(bConfig)
|
||||
b.Setup(&bConfig)
|
||||
|
||||
if !b.IsEnabled() ||
|
||||
b.RESTPollingDelay != time.Duration(10) || b.Verbose ||
|
||||
|
||||
@@ -121,7 +121,7 @@ func (b *Bittrex) UpdateTicker(p currency.Pair, assetType string) (ticker.Price,
|
||||
tickerPrice.Bid = tick.Result[y].Bid
|
||||
tickerPrice.Last = tick.Result[y].Last
|
||||
tickerPrice.Volume = tick.Result[y].Volume
|
||||
ticker.ProcessTicker(b.GetName(), tickerPrice, assetType)
|
||||
ticker.ProcessTicker(b.GetName(), &tickerPrice, assetType)
|
||||
}
|
||||
}
|
||||
return ticker.GetTicker(b.Name, p, assetType)
|
||||
|
||||
Reference in New Issue
Block a user