mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00: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: 64b6421503dfb9396e46f94f9805ff7f8bf2b31b 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.
|
// 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
|
// 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,
|
// 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
|
// the Scanner returns it to the user. If the token is nil, the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user