mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 07:26:53 +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:
@@ -127,7 +127,7 @@ func (g *Gemini) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets exchange configuration parameters
|
||||
func (g *Gemini) Setup(exch config.ExchangeConfig) {
|
||||
func (g *Gemini) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
g.SetEnabled(false)
|
||||
} else {
|
||||
@@ -154,7 +154,7 @@ func (g *Gemini) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = g.SetAPIURL(&exch)
|
||||
err = g.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ func TestSetup(t *testing.T) {
|
||||
|
||||
geminiConfig.AuthenticatedAPISupport = true
|
||||
|
||||
Session[1].Setup(geminiConfig)
|
||||
Session[2].Setup(geminiConfig)
|
||||
Session[1].Setup(&geminiConfig)
|
||||
Session[2].Setup(&geminiConfig)
|
||||
|
||||
Session[1].APIKey = apiKey1
|
||||
Session[1].APISecret = apiSecret1
|
||||
|
||||
@@ -89,7 +89,7 @@ func (g *Gemini) UpdateTicker(p currency.Pair, assetType string) (ticker.Price,
|
||||
tickerPrice.Last = tick.Last
|
||||
tickerPrice.Volume = tick.Volume.USD
|
||||
|
||||
err = ticker.ProcessTicker(g.GetName(), tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(g.GetName(), &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user