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

@@ -735,13 +735,10 @@ func (e *Exchange) UserLogOutAll(ctx context.Context) (int64, error) {
}
// GetUserMargin returns user margin information
func (e *Exchange) GetUserMargin(ctx context.Context, currency string) (UserMargin, error) {
func (e *Exchange) GetUserMargin(ctx context.Context, ccy string) (UserMargin, error) {
var info UserMargin
return info, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet,
bitmexEndpointUserMargin,
UserCurrencyParams{Currency: currency},
&info)
params := UserCurrencyParams{Currency: ccy}
return info, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, bitmexEndpointUserMargin, params, &info)
}
// GetAllUserMargin returns user margin information
@@ -755,13 +752,10 @@ func (e *Exchange) GetAllUserMargin(ctx context.Context) ([]UserMargin, error) {
}
// GetMinimumWithdrawalFee returns minimum withdrawal fee information
func (e *Exchange) GetMinimumWithdrawalFee(ctx context.Context, currency string) (MinWithdrawalFee, error) {
func (e *Exchange) GetMinimumWithdrawalFee(ctx context.Context, ccy string) (MinWithdrawalFee, error) {
var fee MinWithdrawalFee
return fee, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet,
bitmexEndpointUserMinWithdrawalFee,
UserCurrencyParams{Currency: currency},
&fee)
params := UserCurrencyParams{Currency: ccy}
return fee, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, bitmexEndpointUserMinWithdrawalFee, params, &fee)
}
// GetUserPreferences returns user preferences
@@ -797,13 +791,10 @@ func (e *Exchange) UserRequestWithdrawal(ctx context.Context, params UserRequest
}
// GetWalletInfo returns user wallet information
func (e *Exchange) GetWalletInfo(ctx context.Context, currency string) (WalletInfo, error) {
func (e *Exchange) GetWalletInfo(ctx context.Context, ccy string) (WalletInfo, error) {
var info WalletInfo
if err := e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet,
bitmexEndpointUserWallet,
UserCurrencyParams{Currency: currency},
&info); err != nil {
params := UserCurrencyParams{Currency: ccy}
if err := e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, bitmexEndpointUserWallet, params, &info); err != nil {
return info, err
}
@@ -818,23 +809,17 @@ func (e *Exchange) GetWalletInfo(ctx context.Context, currency string) (WalletIn
}
// GetWalletHistory returns user wallet history transaction data
func (e *Exchange) GetWalletHistory(ctx context.Context, currency string) ([]TransactionInfo, error) {
func (e *Exchange) GetWalletHistory(ctx context.Context, ccy string) ([]TransactionInfo, error) {
var info []TransactionInfo
return info, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet,
bitmexEndpointUserWalletHistory,
UserCurrencyParams{Currency: currency},
&info)
params := UserCurrencyParams{Currency: ccy}
return info, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, bitmexEndpointUserWalletHistory, params, &info)
}
// GetWalletSummary returns user wallet summary
func (e *Exchange) GetWalletSummary(ctx context.Context, currency string) ([]TransactionInfo, error) {
func (e *Exchange) GetWalletSummary(ctx context.Context, ccy string) ([]TransactionInfo, error) {
var info []TransactionInfo
return info, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet,
bitmexEndpointUserWalletSummary,
UserCurrencyParams{Currency: currency},
&info)
params := UserCurrencyParams{Currency: ccy}
return info, e.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodGet, bitmexEndpointUserWalletSummary, params, &info)
}
// SendHTTPRequest sends an unauthenticated HTTP request