Skip to content

Commit

Permalink
make code tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
ksysoev committed Jun 4, 2024
1 parent 3d53cc5 commit 05d6c27
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/echo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func TestEcho(t *testing.T) {
}

url := "ws://" + s.Addr().String()

ws, _, err := websocket.Dial(context.Background(), url, nil)
if err != nil {
t.Errorf("Unexpected error dialing websocket: %s", err)
Expand All @@ -56,9 +57,9 @@ func TestEcho(t *testing.T) {
t.Errorf("Unexpected error writing to websocket: %s", err)
}

var actual interface{}
err = wsjson.Read(context.Background(), ws, &actual)
if err != nil {
var actual any

if err := wsjson.Read(context.Background(), ws, &actual); err != nil {
t.Errorf("Unexpected error reading from websocket: %s", err)
}

Expand Down

0 comments on commit 05d6c27

Please sign in to comment.