mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 07:26:48 +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:
@@ -103,7 +103,7 @@ func (b *Bitflyer) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup takes in the supplied exchange configuration details and sets params
|
||||
func (b *Bitflyer) Setup(exch config.ExchangeConfig) {
|
||||
func (b *Bitflyer) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
b.SetEnabled(false)
|
||||
} else {
|
||||
@@ -130,7 +130,7 @@ func (b *Bitflyer) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = b.SetAPIURL(&exch)
|
||||
err = b.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ func TestSetup(t *testing.T) {
|
||||
bitflyerConfig.APIKey = testAPIKey
|
||||
bitflyerConfig.APISecret = testAPISecret
|
||||
|
||||
b.Setup(bitflyerConfig)
|
||||
b.Setup(&bitflyerConfig)
|
||||
}
|
||||
|
||||
func TestGetLatestBlockCA(t *testing.T) {
|
||||
|
||||
@@ -66,7 +66,7 @@ func (b *Bitflyer) UpdateTicker(p currency.Pair, assetType string) (ticker.Price
|
||||
tickerPrice.Last = tickerNew.Last
|
||||
tickerPrice.Volume = tickerNew.Volume
|
||||
// tickerPrice.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