mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 23:16: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:
@@ -49,7 +49,7 @@ func (b *BTCC) SetDefaults() {
|
||||
}
|
||||
|
||||
// Setup is run on startup to setup exchange with config values
|
||||
func (b *BTCC) Setup(exch config.ExchangeConfig) {
|
||||
func (b *BTCC) Setup(exch *config.ExchangeConfig) {
|
||||
if !exch.Enabled {
|
||||
b.SetEnabled(false)
|
||||
} else {
|
||||
@@ -76,7 +76,7 @@ func (b *BTCC) Setup(exch config.ExchangeConfig) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
err = b.SetAPIURL(&exch)
|
||||
err = b.SetAPIURL(exch)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func TestSetup(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error("Test Failed - BTCC Setup() init error")
|
||||
}
|
||||
b.Setup(bConfig)
|
||||
b.Setup(&bConfig)
|
||||
|
||||
if !b.IsEnabled() || b.AuthenticatedAPISupport ||
|
||||
b.RESTPollingDelay != time.Duration(10) || b.Verbose ||
|
||||
|
||||
Reference in New Issue
Block a user