mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 15:10:46 +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:
@@ -92,7 +92,7 @@ func (b *Bitstamp) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets configuration values to bitstamp
|
||||
func (b *Bitstamp) Setup(exch config.ExchangeConfig) {
|
||||
func (b *Bitstamp) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
b.SetEnabled(false)
|
||||
} else {
|
||||
@@ -123,7 +123,7 @@ func (b *Bitstamp) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = b.SetAPIURL(&exch)
|
||||
err = b.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestSetup(t *testing.T) {
|
||||
bConfig.APISecret = apiSecret
|
||||
bConfig.ClientID = customerID
|
||||
|
||||
b.Setup(bConfig)
|
||||
b.Setup(&bConfig)
|
||||
b.ClientID = customerID
|
||||
|
||||
if !b.IsEnabled() || b.RESTPollingDelay != time.Duration(10) ||
|
||||
|
||||
@@ -75,7 +75,7 @@ func (b *Bitstamp) UpdateTicker(p currency.Pair, assetType string) (ticker.Price
|
||||
tickerPrice.Volume = tick.Volume
|
||||
tickerPrice.High = tick.High
|
||||
|
||||
err = ticker.ProcessTicker(b.GetName(), tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(b.GetName(), &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user