Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service/dap: use == to test io.EOF #3464

Merged
merged 1 commit into from
Aug 12, 2023
Merged

service/dap: use == to test io.EOF #3464

merged 1 commit into from
Aug 12, 2023

Conversation

callthingsoff
Copy link
Contributor

The documentation of io.EOF:
Read must return EOF itself, not an error wrapping EOF, because callers will test for EOF using ==.

This is a trivial change; people may think it's normal use of "errors.Is", even it's OK, it could be
replaced with "errors.Is(err, io.EOF)" in idiomatic way.

The documentation of io.EOF: Read must return EOF itself, not an error
wrapping EOF, because callers will test for EOF using ==.

This is a trivial change; people may think it's normal use of "errors.Is",
even it's OK, it could be replaced with "errors.Is(err, io.EOF)" in idiomatic way.
Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aarzilli aarzilli merged commit 17d1f4c into go-delve:master Aug 12, 2023
@callthingsoff callthingsoff deleted the test_EOF branch August 12, 2023 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants