Skip to content

Document Skip/SkipOnly behavior; test rewrapping and empty reads - #24

Merged
dimchansky merged 2 commits into
masterfrom
docs/release-followup
Oct 21, 2026
Merged

dimchansky merged 2 commits into
masterfrom
docs/release-followup

Conversation

@dimchansky

Copy link
Copy Markdown
Owner

Follow-up to #23 from the release review. Documentation and tests only; no production logic changes.

  • Skip / SkipOnly docs: they read up to 4 bytes from the source immediately and may block; an error from that read is returned once by Read, after the bytes that remain after BOM removal; Skip on a *Reader returns it with its encoding, without reading.
  • TestReader_ReadEmpty: after Read(nil), the rest of the stream is read and checked, so buffered data or a pending error cannot be lost.
  • TestSkipAfterPartialRead: Skip on a partially read *Reader returns the same reader and original encoding, keeps the remaining payload, and makes no source reads.
  • README wording: Unknown means 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.

- 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.
@dimchansky
dimchansky merged commit ad37ce7 into master Oct 21, 2026
5 checks passed
@dimchansky
dimchansky deleted the docs/release-followup branch October 21, 2026 17: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.

1 participant