mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
build/linters: Bump Go to v1.25 and golangci-lint to v2.4.0 (#2005)
* build/linters: Bump Go to v1.25 and golangci-lint to v2.4.0 * refactor: Update TODO comments for net.Listen and net.DialTimeout; improve variable naming in websocket and exchange methods * refactor: Rename massageMissingData to backfillMissingData for clarity and update references in RSI and MFI calculations * fix: Correct typo in TODO comment for net.Listen in RPC server
This commit is contained in:
@@ -156,7 +156,7 @@ func (m *ntpManager) processTime() error {
|
||||
// if no server can be reached will return local time in UTC()
|
||||
func (m *ntpManager) checkTimeInPools() time.Time {
|
||||
for i := range m.pools {
|
||||
con, err := net.DialTimeout("udp", m.pools[i], 5*time.Second)
|
||||
con, err := net.DialTimeout("udp", m.pools[i], 5*time.Second) //nolint:noctx // TODO: #2006 Use (*net.Dialer).DialContext with (*net.Dialer).Timeout
|
||||
if err != nil {
|
||||
log.Warnf(log.TimeMgr, "Unable to connect to hosts %v attempting next", m.pools[i])
|
||||
continue
|
||||
|
||||
@@ -943,10 +943,10 @@ func (s *store) get() map[string][]*order.Detail {
|
||||
}
|
||||
|
||||
// getByExchangeAndID returns a specific order by exchange and id
|
||||
func (s *store) getByExchangeAndID(exchange, id string) (*order.Detail, error) {
|
||||
func (s *store) getByExchangeAndID(exch, id string) (*order.Detail, error) {
|
||||
s.m.Lock()
|
||||
defer s.m.Unlock()
|
||||
r, ok := s.Orders[strings.ToLower(exchange)]
|
||||
r, ok := s.Orders[strings.ToLower(exch)]
|
||||
if !ok {
|
||||
return nil, ErrExchangeNotFound
|
||||
}
|
||||
|
||||
@@ -333,9 +333,9 @@ func (m *portfolioManager) IsWhiteListed(address string) bool {
|
||||
}
|
||||
|
||||
// IsExchangeSupported checks if an exchange is supported
|
||||
func (m *portfolioManager) IsExchangeSupported(exchange, address string) bool {
|
||||
func (m *portfolioManager) IsExchangeSupported(exch, address string) bool {
|
||||
if m == nil || !m.IsRunning() {
|
||||
return false
|
||||
}
|
||||
return m.base.IsExchangeSupported(exchange, address)
|
||||
return m.base.IsExchangeSupported(exch, address)
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ func StartRPCServer(engine *Engine) {
|
||||
return
|
||||
}
|
||||
log.Debugf(log.GRPCSys, "gRPC server support enabled. Starting gRPC server on https://%v.\n", engine.Config.RemoteControl.GRPC.ListenAddress)
|
||||
lis, err := net.Listen("tcp", engine.Config.RemoteControl.GRPC.ListenAddress)
|
||||
lis, err := net.Listen("tcp", engine.Config.RemoteControl.GRPC.ListenAddress) //nolint:noctx // TODO: #2006 Replace net.Listen with (*net.ListenConfig).Listen
|
||||
if err != nil {
|
||||
log.Errorf(log.GRPCSys, "gRPC server failed to bind to port: %s", err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user