mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Bump golangci-lint version to 1.16.0 (#311)
This commit is contained in:
committed by
Adrian Gallagher
parent
993b73f5cc
commit
e8bc3b5e76
@@ -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 ./...
|
||||
|
||||
|
||||
@@ -78,4 +78,4 @@ issues:
|
||||
- gosec
|
||||
|
||||
service:
|
||||
golangci-lint-version: 1.15.x
|
||||
golangci-lint-version: 1.16.x
|
||||
2
Makefile
2
Makefile
@@ -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
|
||||
|
||||
@@ -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("")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,6 @@ func (b *BTSE) WsConnect() error {
|
||||
b.Name, err)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
go b.WsHandleData()
|
||||
b.GenerateDefaultSubscriptions()
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user