Skip to content

Commit

Permalink
fixing remaining linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel1984 committed Jan 2, 2021
1 parent 42afd45 commit ca5c464
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
language: go

go:
- 1.14.2
- 1.15.5

install:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.34.1
- go get -t ./...

script:
Expand Down
6 changes: 5 additions & 1 deletion pkg/mux/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/sha512"
"encoding/hex"
"encoding/json"
"fmt"
"net"

"github.com/bitfinexcom/bitfinex-api-go/pkg/models/event"
Expand Down Expand Up @@ -61,7 +62,10 @@ func (c *Client) Private(key, sec string) *Client {

payload := "AUTH" + nonce
sig := hmac.New(sha512.New384, []byte(sec))
sig.Write([]byte(payload))
if _, err := sig.Write([]byte(payload)); err != nil {
fmt.Printf("err generating sig:%s\n", err)
return c
}
pldSign := hex.EncodeToString(sig.Sum(nil))
sub := event.Subscribe{
Event: "auth",
Expand Down
2 changes: 0 additions & 2 deletions pkg/mux/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,11 @@ func (m *Mux) handleEvent(i event.Info, err error) (event.Info, error) {
switch i.Event {
case "subscribed":
m.subInfo[i.ChanID] = i
break
case "auth":
if i.Status == "OK" {
m.subInfo[i.ChanID] = i
m.authenticated = true
}
break
default:
fmt.Printf("unhandled evtn: %+v\n", i)
}
Expand Down

0 comments on commit ca5c464

Please sign in to comment.