mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
Bump golangci-lint to v1.24.0, linter fixes and general code improvements (#478)
* Bump golangci-lint version, update Go version deps and generic code improvements * Fix wesbocket resp nil check and zip closures * Update pprof path
This commit is contained in:
@@ -172,8 +172,9 @@ func (c *Config) PurgeExchangeAPICredentials() {
|
||||
// GetCommunicationsConfig returns the communications configuration
|
||||
func (c *Config) GetCommunicationsConfig() CommunicationsConfig {
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
return c.Communications
|
||||
comms := c.Communications
|
||||
m.Unlock()
|
||||
return comms
|
||||
}
|
||||
|
||||
// UpdateCommunicationsConfig sets a new updated version of a Communications
|
||||
@@ -187,8 +188,9 @@ func (c *Config) UpdateCommunicationsConfig(config *CommunicationsConfig) {
|
||||
// GetCryptocurrencyProviderConfig returns the communications configuration
|
||||
func (c *Config) GetCryptocurrencyProviderConfig() CryptocurrencyProvider {
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
return c.Currency.CryptocurrencyProvider
|
||||
provider := c.Currency.CryptocurrencyProvider
|
||||
m.Unlock()
|
||||
return provider
|
||||
}
|
||||
|
||||
// UpdateCryptocurrencyProviderConfig returns the communications configuration
|
||||
@@ -677,8 +679,9 @@ func (c *Config) GetCurrencyPairDisplayConfig() *CurrencyPairFormatConfig {
|
||||
// GetAllExchangeConfigs returns all exchange configurations
|
||||
func (c *Config) GetAllExchangeConfigs() []ExchangeConfig {
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
return c.Exchanges
|
||||
configs := c.Exchanges
|
||||
m.Unlock()
|
||||
return configs
|
||||
}
|
||||
|
||||
// GetExchangeConfig returns exchange configurations by its indivdual name
|
||||
@@ -708,8 +711,9 @@ func (c *Config) GetForexProvider(name string) (currency.FXSettings, error) {
|
||||
// GetForexProviders returns a list of available forex providers
|
||||
func (c *Config) GetForexProviders() []currency.FXSettings {
|
||||
m.Lock()
|
||||
defer m.Unlock()
|
||||
return c.Currency.ForexProviders
|
||||
fxProviders := c.Currency.ForexProviders
|
||||
m.Unlock()
|
||||
return fxProviders
|
||||
}
|
||||
|
||||
// GetPrimaryForexProvider returns the primary forex provider
|
||||
|
||||
Reference in New Issue
Block a user