mirror of https://github.com/golang/go.git
Mentions ErrFinalToken in SplitFunc documentation
A custom split function may return ErrFinalToken to trigger special processing. This is documented in the package documentation but not in that of SplitFunc itself. This short mention of it will hopefully reduce confusion. Fixes golang#44261
This commit is contained in:
parent
756fd56bbf
commit
64b6421503
|
|
@ -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