Skip to content

Commit

Permalink
Bump golangci-lint version to 1.16.0 (thrasher-corp#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
shazbert authored and thrasher- committed May 27, 2019
1 parent 993b73f commit e8bc3b5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...

Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ issues:
- gosec

service:
golangci-lint-version: 1.15.x
golangci-lint-version: 1.16.x
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
Expand Down
5 changes: 3 additions & 2 deletions exchanges/btcmarkets/btcmarkets_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions exchanges/btse/btse_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ func (b *BTSE) WsConnect() error {
b.Name, err)
}

if err != nil {
return err
}

go b.WsHandleData()
b.GenerateDefaultSubscriptions()

Expand Down
2 changes: 1 addition & 1 deletion exchanges/huobi/huobi_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 2 additions & 3 deletions exchanges/localbitcoins/localbitcoins_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8bc3b5

Please sign in to comment.