Repository navigation
Document Skip/SkipOnly behavior; test rewrapping and empty reads - #24
Merged
Merged
Conversation
- Skip and SkipOnly docs: they read from the source immediately and may block, probe errors are returned later by Read, and Skip on a *Reader returns it without reading. - TestReader_ReadEmpty: after Read(nil), the remaining data and pending error are still delivered. - TestSkipAfterPartialRead: Skip on a partially read *Reader returns the same reader and encoding, keeps its position, and does not read from the source. - README: precise wording for Unknown, error delivery and the no-progress limit.
The service has shut down and the badge now shows "retired". Lint is covered by the golangci-lint job in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #23 from the release review. Documentation and tests only; no production logic changes.
Read, after the bytes that remain after BOM removal;Skipon a*Readerreturns it with its encoding, without reading.Read(nil), the rest of the stream is read and checked, so buffered data or a pending error cannot be lost.Skipon a partially read*Readerreturns the same reader and original encoding, keeps the remaining payload, and makes no source reads.Unknownmeans no supported BOM was detected; the probe error comes after the bytes remaining after BOM removal; "100 consecutive reads returning(0, nil)".Verified locally:
make check(vet, golangci-lint v2.15.0, race tests) on Go 1.27.3; race + shuffle tests on Go 1.19.13; govulncheck v1.9.0 on Go 1.27.3: no vulnerabilities.