Skip to content

Commit adc5ba9

Browse files
committed
lint: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error
1 parent b84a0e5 commit adc5ba9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/integrationtest/monitor/monitor_grpc_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ package monitor_test
1717

1818
import (
1919
"context"
20+
"errors"
2021
"fmt"
2122
"io"
2223
"regexp"
@@ -88,7 +89,7 @@ func TestMonitorGRPCClose(t *testing.T) {
8889
var tmpFile *paths.Path
8990
for {
9091
monResp, err := mon.Recv()
91-
if err == io.EOF {
92+
if errors.Is(err, io.EOF) {
9293
fmt.Println("MON>", err)
9394
break
9495
}

0 commit comments

Comments
 (0)