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

fix Read assumptions #24

Merged
merged 1 commit into from
Mar 8, 2018
Merged

fix Read assumptions #24

merged 1 commit into from
Mar 8, 2018

Conversation

Stebalien
Copy link
Member

Read can return 1, io.EOF on end of file. According to the ByteReader interface, we should be returning the byte read along with a nil error in this case.

Also, handle the short-read case by returning the appropriate error.

Read can return 1, io.EOF on end of file. According to the ByteReader interface,
we should be returning the byte read along with a nil error in this case.

Also, handle the short-read case by returning the appropriate error.
@Stebalien Stebalien requested a review from Kubuxu March 8, 2018 03:13
@@ -421,22 +419,22 @@ func lpReadBuf(r io.Reader) ([]byte, error) {

}

type byteReaderIface interface {
Copy link
Member Author

Choose a reason for hiding this comment

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

Got rid of this as we don't really need it.

@Stebalien Stebalien merged commit 612ce31 into master Mar 8, 2018
@Stebalien Stebalien mentioned this pull request Mar 8, 2018
9 tasks
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