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

@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"net/http"
"time"
"github.com/gorilla/websocket"
@@ -293,7 +294,7 @@ func (c *COINUT) GetDerivativeInstruments(secType string) (interface{}, error) {
}
// GetOptionChain returns option chain
func (c *COINUT) GetOptionChain(asset, secType string, expiry int64) (OptionChainResponse, error) {
func (c *COINUT) GetOptionChain(asset, secType string) (OptionChainResponse, error) {
var result OptionChainResponse
params := make(map[string]interface{})
params["asset"] = asset
@@ -368,7 +369,7 @@ func (c *COINUT) SendHTTPRequest(apiRequest string, params map[string]interface{
headers["Content-Type"] = "application/json"
var rawMsg json.RawMessage
err = c.SendPayload("POST", c.APIUrl, headers, bytes.NewBuffer(payload), &rawMsg, authenticated, c.Verbose)
err = c.SendPayload(http.MethodPost, c.APIUrl, headers, bytes.NewBuffer(payload), &rawMsg, authenticated, c.Verbose)
if err != nil {
return err
}

View File

@@ -290,7 +290,7 @@ func (c *COINUT) CancelOrder(order exchange.OrderCancellation) error {
}
// CancelAllOrders cancels all orders associated with a currency pair
func (c *COINUT) CancelAllOrders(orderCancellation exchange.OrderCancellation) (exchange.CancelAllOrdersResponse, error) {
func (c *COINUT) CancelAllOrders(_ exchange.OrderCancellation) (exchange.CancelAllOrdersResponse, error) {
// TODO, this is a terrible implementation. Requires DB to improve
// Coinut provides no way of retrieving orders without a currency
// So we need to retrieve all currencies, then retrieve orders for each currency