Skip to content

Commit

Permalink
linter: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan O'Hara-Reid committed Nov 18, 2024
1 parent d90a632 commit f1ca7bd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions exchanges/gateio/gateio_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,8 @@ func (g *Gateio) handleSubscription(ctx context.Context, conn stream.Connection,
var resp WsEventResponse
if err = json.Unmarshal(result, &resp); err != nil {
errs = common.AppendError(errs, err)
} else {
if resp.Error != nil && resp.Error.Code != 0 {
errs = common.AppendError(errs, fmt.Errorf("error while %s to channel %s error code: %d message: %s", payloads[k].Event, payloads[k].Channel, resp.Error.Code, resp.Error.Message))
}
} else if resp.Error != nil && resp.Error.Code != 0 {
errs = common.AppendError(errs, fmt.Errorf("error while %s to channel %s error code: %d message: %s", payloads[k].Event, payloads[k].Channel, resp.Error.Code, resp.Error.Message))
}
}
return errs
Expand Down

0 comments on commit f1ca7bd

Please sign in to comment.