-
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.help wanted
Milestone
Description
What did you do?
I went to https://golang.org/pkg/bufio/#SplitFunc and read the documentation to implement a SplitFunc. In my implementation of a SplitFunc, for the case of atEOF, I simply returned len(data), data, nil thinking the Scanner would stop calling my function. It didn't (I was getting panic: bufio.Scan: too many empty tokens without progressing). I went back and looked at the "EmptyFinalToken" example here. It refered to ErrFinalToken which I was surprised to see since it wasn't mentioned in the SplitFunc documentation.
What did you expect to see?
I'd expect the SplitFunc documentation to include a reference to ErrFinalToken.
What did you see instead?
No reference to it at all.
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.help wanted