mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 15:10: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:
@@ -1,6 +1,7 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"time"
|
||||
@@ -46,7 +47,7 @@ func (i *Instance) SetPostgresConnection(con *sql.DB) error {
|
||||
if con == nil {
|
||||
return errNilSQL
|
||||
}
|
||||
if err := con.Ping(); err != nil {
|
||||
if err := con.PingContext(context.TODO()); err != nil {
|
||||
return fmt.Errorf("%w %s", errFailedPing, err)
|
||||
}
|
||||
i.m.Lock()
|
||||
@@ -117,7 +118,7 @@ func (i *Instance) Ping() error {
|
||||
if i.SQL == nil {
|
||||
return errNilSQL
|
||||
}
|
||||
return i.SQL.Ping()
|
||||
return i.SQL.PingContext(context.TODO())
|
||||
}
|
||||
|
||||
// GetSQL returns the sql connection
|
||||
|
||||
Reference in New Issue
Block a user