mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 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:
@@ -78,7 +78,7 @@ func (y *Yobit) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup sets exchange configuration parameters for Yobit
|
||||
func (y *Yobit) Setup(exch config.ExchangeConfig) {
|
||||
func (y *Yobit) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
y.SetEnabled(false)
|
||||
} else {
|
||||
@@ -105,7 +105,7 @@ func (y *Yobit) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = y.SetAPIURL(&exch)
|
||||
err = y.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ func TestSetup(t *testing.T) {
|
||||
conf.APISecret = apiSecret
|
||||
conf.AuthenticatedAPISupport = true
|
||||
|
||||
y.Setup(conf)
|
||||
y.Setup(&conf)
|
||||
}
|
||||
|
||||
func TestGetInfo(t *testing.T) {
|
||||
|
||||
@@ -59,7 +59,7 @@ func (y *Yobit) UpdateTicker(p currency.Pair, assetType string) (ticker.Price, e
|
||||
tickerPrice.Low = result[currency].Low
|
||||
tickerPrice.Volume = result[currency].VolumeCurrent
|
||||
|
||||
err = ticker.ProcessTicker(y.Name, tickerPrice, assetType)
|
||||
err = ticker.ProcessTicker(y.Name, &tickerPrice, assetType)
|
||||
if err != nil {
|
||||
return tickerPrice, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user