Bump golangci-lint version to 1.16.0 (#311)

This commit is contained in:
Ryan O'Hara-Reid
2019-05-27 14:10:54 +10:00
committed by Adrian Gallagher
parent 993b73f5cc
commit e8bc3b5e76
8 changed files with 10 additions and 14 deletions

View File

@@ -28,7 +28,7 @@ before_test:
test_script:
# test back-end
- go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.15.0
- go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.16.0
- '%GOPATH%\bin\golangci-lint.exe run --verbose'
- go test -race ./...

View File

@@ -78,4 +78,4 @@ issues:
- gosec
service:
golangci-lint-version: 1.15.x
golangci-lint-version: 1.16.x

View File

@@ -1,6 +1,6 @@
LDFLAGS = -ldflags "-w -s"
GCTPKG = github.com/thrasher-/gocryptotrader
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.15.0
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.16.0
LINTBIN = $(GOPATH)/bin/golangci-lint
GCTLISTENPORT=9050
GCTPROFILERLISTENPORT=8085

View File

@@ -848,7 +848,7 @@ func TestReadConfig(t *testing.T) {
err = readConfig.ReadConfig("bla")
if err == nil {
t.Error("Test failed. TestReadConfig " + err.Error())
t.Error("Test failed. TestReadConfig error cannot be nil")
}
err = readConfig.ReadConfig("")

View File

@@ -232,6 +232,7 @@ func (b *BTCMarkets) CancelAllOrders(_ *exchange.OrderCancellation) (exchange.Ca
orderIDInt, err := strconv.ParseInt(openOrders[i].ID, 10, 64)
if err != nil {
cancelAllOrdersResponse.OrderStatus[openOrders[i].ID] = err.Error()
continue
}
orderList = append(orderList, orderIDInt)
}
@@ -243,8 +244,8 @@ func (b *BTCMarkets) CancelAllOrders(_ *exchange.OrderCancellation) (exchange.Ca
}
for i := range orders {
if err != nil {
cancelAllOrdersResponse.OrderStatus[strconv.FormatInt(orders[i].ID, 10)] = err.Error()
if !orders[i].Success {
cancelAllOrdersResponse.OrderStatus[strconv.FormatInt(orders[i].ID, 10)] = orders[i].ErrorMessage
}
}
}

View File

@@ -47,10 +47,6 @@ func (b *BTSE) WsConnect() error {
b.Name, err)
}
if err != nil {
return err
}
go b.WsHandleData()
b.GenerateDefaultSubscriptions()

View File

@@ -47,7 +47,7 @@ func (h *HUOBI) Run() {
if common.StringDataContains(h.BaseCurrencies.Strings(), "CNY") {
cfg := config.GetConfig()
exchCfg, errCNY := cfg.GetExchangeConfig(h.Name)
if err != nil {
if errCNY != nil {
log.Errorf("%s failed to get exchange config. %s\n", h.Name, errCNY)
return
}

View File

@@ -192,9 +192,8 @@ func (l *LocalBitcoins) SubmitOrder(p currency.Pair, side exchange.OrderSide, _
if err != nil {
return submitOrderResponse, err
}
if err == nil {
submitOrderResponse.IsOrderPlaced = true
}
submitOrderResponse.IsOrderPlaced = true
// Now to figure out what ad we just submitted
// The only details we have are the params above