mirror of
https://github.com/golang/go
synced 2024-11-23 05:00:07 -07:00
bufio: mention ErrFinalToken in SplitFunc documentation
It is documented elsewhere in the package documentation but this additional
mention of it will hopefully reduce confusion.
Fixes #44261
Change-Id: I4e9d8f4564ebb7fbe047c92ee2cdffedb39f2a31
GitHub-Last-Rev: 64b6421503
GitHub-Pull-Request: golang/go#45839
Reviewed-on: https://go-review.googlesource.com/c/go/+/314969
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
c23a32284a
commit
93200b98c7
@ -48,7 +48,8 @@ type Scanner struct {
|
||||
// and the next token to return to the user, if any, plus an error, if any.
|
||||
//
|
||||
// Scanning stops if the function returns an error, in which case some of
|
||||
// the input may be discarded.
|
||||
// the input may be discarded. If that error is ErrFinalToken, scanning
|
||||
// stops with no error.
|
||||
//
|
||||
// Otherwise, the Scanner advances the input. If the token is not nil,
|
||||
// the Scanner returns it to the user. If the token is nil, the
|
||||
|
Loading…
Reference in New Issue
Block a user