diff options
author | Matt Harden <matt.harden@gmail.com> | 2021-04-30 01:34:44 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-04-30 19:34:38 +0000 |
commit | 93200b98c75500b80a2bf7cc31c2a72deff2741c (patch) | |
tree | 20a7046d661ae8484883a00362a60528706b029e /src/bufio | |
parent | c23a32284a5a1e45855915a7401ebb715b837d10 (diff) | |
download | go-93200b98c75500b80a2bf7cc31c2a72deff2741c.tar.gz go-93200b98c75500b80a2bf7cc31c2a72deff2741c.zip |
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>
Diffstat (limited to 'src/bufio')
-rw-r--r-- | src/bufio/scan.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bufio/scan.go b/src/bufio/scan.go index af46a14fbb..4846d4f733 100644 --- a/src/bufio/scan.go +++ b/src/bufio/scan.go @@ -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 |