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

Make peeker.ReadByte follow buffer.ReadByte semantics #61

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

MarcoPolo
Copy link
Contributor

A continuation of #60. There was an edge case that wasn't checked. If the reader was a peeker it would simply call peeker.ReadByte, which didn't follow the semantics of buffer.ReadByte, readByteBuf, or any other ReadByte method in the Go library. Specifically it should only return an error if it failed to read a byte.

I added a test and also tested this branch against my end code to verify it actually fixes the issue.

@Stebalien since they already have context from #60.

@Stebalien Stebalien merged commit 7a69943 into whyrusleeping:master Feb 24, 2022
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