mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 07:26:47 +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:
@@ -82,7 +82,7 @@ func (z *ZB) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets user configuration
|
||||
func (z *ZB) Setup(exch config.ExchangeConfig) {
|
||||
func (z *ZB) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
z.SetEnabled(false)
|
||||
} else {
|
||||
@@ -110,7 +110,7 @@ func (z *ZB) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = z.SetAPIURL(&exch)
|
||||
err = z.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func TestSetup(t *testing.T) {
|
||||
zbConfig.APIKey = apiKey
|
||||
zbConfig.APISecret = apiSecret
|
||||
|
||||
z.Setup(zbConfig)
|
||||
z.Setup(&zbConfig)
|
||||
}
|
||||
|
||||
func TestSpotNewOrder(t *testing.T) {
|
||||
|
||||
@@ -76,7 +76,7 @@ func (z *ZB) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, erro
|
||||
tp.Low = result[currency].Low
|
||||
tp.Volume = result[currency].Vol
|
||||
|
||||
err = ticker.ProcessTicker(z.Name, tp, assetType)
|
||||
err = ticker.ProcessTicker(z.Name, &tp, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user