Linter fixes (#246)

Linter fixes
This commit is contained in:
Adrian Gallagher
2019-02-05 16:26:04 +11:00
committed by GitHub
parent d7368c1a8d
commit 5e5ca8a887
85 changed files with 641 additions and 794 deletions

View File

@@ -3,6 +3,7 @@ package bitflyer
import (
"errors"
"fmt"
"net/http"
"net/url"
"strconv"
"time"
@@ -377,16 +378,17 @@ func (b *Bitflyer) GetTradingCommission() {
// SendHTTPRequest sends an unauthenticated request
func (b *Bitflyer) SendHTTPRequest(path string, result interface{}) error {
return b.SendPayload("GET", path, nil, nil, result, false, b.Verbose)
return b.SendPayload(http.MethodGet, path, nil, nil, result, false, b.Verbose)
}
// SendAuthHTTPRequest sends an authenticated HTTP request
// Note: HTTP not done due to incorrect account privileges, please open a PR
// if you have access and update the authenticated requests
func (b *Bitflyer) SendAuthHTTPRequest(path string, params url.Values, result interface{}) {
headers := make(map[string]string)
headers["ACCESS-KEY"] = b.APIKey
headers["ACCESS-TIMESTAMP"] = strconv.FormatInt(time.Now().UnixNano(), 10)
// TODO: Fill out this function once API access is obtained
func (b *Bitflyer) SendAuthHTTPRequest() {
//headers := make(map[string]string)
//headers["ACCESS-KEY"] = b.APIKey
//headers["ACCESS-TIMESTAMP"] = strconv.FormatInt(time.Now().UnixNano(), 10)
}
// GetFee returns an estimate of fee based on type of transaction

View File

@@ -171,7 +171,7 @@ func (b *Bitflyer) CancelOrder(order exchange.OrderCancellation) error {
}
// CancelAllOrders cancels all orders associated with a currency pair
func (b *Bitflyer) CancelAllOrders(orderCancellation exchange.OrderCancellation) (exchange.CancelAllOrdersResponse, error) {
func (b *Bitflyer) CancelAllOrders(_ exchange.OrderCancellation) (exchange.CancelAllOrdersResponse, error) {
// TODO, implement BitFlyer API
b.CancelAllExistingOrders()
return exchange.CancelAllOrdersResponse{}, common.ErrNotYetImplemented