Bump golangci-lint to v1.24.0, linter fixes and general code improvements (#478)

* Bump golangci-lint version, update Go version deps and generic code improvements

* Fix wesbocket resp nil check and zip closures

* Update pprof path
This commit is contained in:
Adrian Gallagher
2020-04-09 13:07:32 +10:00
committed by GitHub
parent 4748a7849c
commit 0d787bc259
47 changed files with 193 additions and 178 deletions

View File

@@ -17,7 +17,9 @@ func (a *Alphapoint) WebsocketClient() {
for a.Enabled {
var dialer websocket.Dialer
var err error
a.WebsocketConn, _, err = dialer.Dial(a.API.Endpoints.WebsocketURL, http.Header{})
var httpResp *http.Response
a.WebsocketConn, httpResp, err = dialer.Dial(a.API.Endpoints.WebsocketURL, http.Header{})
httpResp.Body.Close() // not used, so safely free the body
if err != nil {
log.Errorf(log.ExchangeSys, "%s Unable to connect to Websocket. Error: %s\n", a.Name, err)