mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +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 (g *Gateio) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets user configuration
|
||||
func (g *Gateio) Setup(exch config.ExchangeConfig) {
|
||||
func (g *Gateio) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
g.SetEnabled(false)
|
||||
} else {
|
||||
@@ -109,7 +109,7 @@ func (g *Gateio) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = g.SetAPIURL(&exch)
|
||||
err = g.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func TestSetup(t *testing.T) {
|
||||
gateioConfig.APIKey = apiKey
|
||||
gateioConfig.APISecret = apiSecret
|
||||
|
||||
g.Setup(gateioConfig)
|
||||
g.Setup(&gateioConfig)
|
||||
}
|
||||
|
||||
func TestGetSymbols(t *testing.T) {
|
||||
|
||||
@@ -68,7 +68,7 @@ func (g *Gateio) UpdateTicker(p currency.Pair, assetType string) (ticker.Price,
|
||||
tp.Low = result[currency].Low
|
||||
tp.Volume = result[currency].Volume
|
||||
|
||||
err = ticker.ProcessTicker(g.Name, tp, assetType)
|
||||
err = ticker.ProcessTicker(g.Name, &tp, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user