mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-29 15:10:37 +00:00
Migrate from gometalinter.v2 to golangci-lint (#249)
* Migrate from gometalinter.v2 to golangci-lint
This commit is contained in:
@@ -307,7 +307,7 @@ func (b *Bithumb) GetAccountBalance(c string) (FullBalance, error) {
|
||||
fullBalance.Xcoin[c] = val
|
||||
|
||||
default:
|
||||
return fullBalance, fmt.Errorf("GetAccountBalance error tag name %s unhandled",
|
||||
return fullBalance, fmt.Errorf("getaccountbalance error tag name %s unhandled",
|
||||
splitTag)
|
||||
}
|
||||
}
|
||||
@@ -597,7 +597,7 @@ func (b *Bithumb) SendAuthenticatedHTTPRequest(path string, params url.Values, r
|
||||
err = common.JSONDecode(intermediary, &errCapture)
|
||||
if err == nil {
|
||||
if errCapture.Status != "" && errCapture.Status != "0000" {
|
||||
return fmt.Errorf("SendAuthenticatedHTTPRequest error Code:%s Message:%s",
|
||||
return fmt.Errorf("sendAuthenticatedAPIRequest error code: %s message:%s",
|
||||
errCapture.Status,
|
||||
errCode[errCapture.Status])
|
||||
}
|
||||
@@ -627,9 +627,8 @@ func (b *Bithumb) GetFee(feeBuilder exchange.FeeBuilder) (float64, error) {
|
||||
}
|
||||
|
||||
// calculateTradingFee returns fee when performing a trade
|
||||
func calculateTradingFee(purchasePrice float64, amount float64) float64 {
|
||||
func calculateTradingFee(purchasePrice, amount float64) float64 {
|
||||
fee := 0.0015
|
||||
|
||||
return fee * amount * purchasePrice
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ func (b *Bithumb) GetTradingPairs() ([]string, error) {
|
||||
}
|
||||
|
||||
for x := range currencies {
|
||||
currencies[x] = currencies[x] + "KRW"
|
||||
currencies[x] += "KRW"
|
||||
}
|
||||
|
||||
return currencies, nil
|
||||
@@ -136,7 +136,7 @@ func (b *Bithumb) GetAccountInfo() (exchange.AccountInfo, error) {
|
||||
for key, totalAmount := range bal.Total {
|
||||
hold, ok := bal.InUse[key]
|
||||
if !ok {
|
||||
return info, fmt.Errorf("GetAccountInfo error - in use item not found for currency %s",
|
||||
return info, fmt.Errorf("getAccountInfo error - in use item not found for currency %s",
|
||||
key)
|
||||
}
|
||||
|
||||
@@ -270,10 +270,10 @@ func (b *Bithumb) WithdrawCryptocurrencyFunds(withdrawRequest exchange.WithdrawR
|
||||
// withdrawal is submitted
|
||||
func (b *Bithumb) WithdrawFiatFunds(withdrawRequest exchange.WithdrawRequest) (string, error) {
|
||||
if math.Mod(withdrawRequest.Amount, 1) != 0 {
|
||||
return "", errors.New("KRW withdrawals do not support decimal places")
|
||||
return "", errors.New("currency KRW does not support decimal places")
|
||||
}
|
||||
if withdrawRequest.Currency.String() != symbol.KRW {
|
||||
return "", errors.New("Only KRW supported")
|
||||
return "", errors.New("only KRW is supported")
|
||||
}
|
||||
bankDetails := fmt.Sprintf("%v_%v", withdrawRequest.BankCode, withdrawRequest.BankName)
|
||||
bankAccountNumber := strconv.FormatFloat(withdrawRequest.BankAccountNumber, 'f', -1, 64)
|
||||
|
||||
Reference in New Issue
Block a user