mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 15:10:44 +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:
@@ -50,7 +50,7 @@ func ({{.Variable}} *{{.CapitalName}}) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup takes in the supplied exchange configuration details and sets params
|
||||
func ({{.Variable}} *{{.CapitalName}}) Setup(exch config.ExchangeConfig) {
|
||||
func ({{.Variable}} *{{.CapitalName}}) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
{{.Variable}}.SetEnabled(false)
|
||||
} else {
|
||||
@@ -77,7 +77,7 @@ func ({{.Variable}} *{{.CapitalName}}) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = {{.Variable}}.SetAPIURL(&exch)
|
||||
err = {{.Variable}}.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func ({{.Variable}} *{{.CapitalName}}) UpdateTicker(p currency.Pair, assetType s
|
||||
// tickerPrice.Last = tick[y].LastPrice
|
||||
// tickerPrice.Low = tick[y].LowPrice
|
||||
// tickerPrice.Volume = tick[y].Volume
|
||||
// ticker.ProcessTicker({{.Variable}}.Name, x, tickerPrice, assetType)
|
||||
// ticker.ProcessTicker({{.Variable}}.Name, x, &tickerPrice, assetType)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user