1
0
Fork 0
mirror of https://github.com/sourcegraph/jsonrpc2.git synced 2026-06-18 13:10:02 +02:00

Use errors.Is/errors.As instead of == comparisons against errors

This commit is contained in:
Michael Bahr 2026-06-11 13:47:36 +00:00
parent 4756698b1e
commit 95b3fbfc6d
No known key found for this signature in database
3 changed files with 8 additions and 4 deletions

View file

@ -190,7 +190,7 @@ func (c *Conn) close(cause error) error {
close(call.done)
}
if cause != nil && cause != io.EOF && cause != io.ErrUnexpectedEOF {
if cause != nil && !errors.Is(cause, io.EOF) && !errors.Is(cause, io.ErrUnexpectedEOF) {
c.logger.Printf("jsonrpc2: protocol error: %v\n", cause)
}