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:
Adrian Gallagher
2025-08-20 11:55:15 +10:00
committed by GitHub
parent 7879633c4a
commit 7ebc392532
63 changed files with 498 additions and 647 deletions

View File

@@ -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