-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
The current document of bufio.SplitFunc does not cover all cases and left few details buried into implementations. Such as:
- A Scanner behave differently when a SplitFunc returns token with nil or an empty byte slice. example
- A Scanner usually skip advanced bytes when returned token is nil. example
Here I propose few changes to doc, clearly state those behavior. Such as:
- If a SplitFunc returns a non-nil error, returned advance and token are ignored.
- If a SplitFunc returns a non-nil token, even if it is empty, Scanner will always yield, no matter what error a reader previously returns.
- If a SplitFunc returns a nil token with non-zero advance, Scanner will skip those bytes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.