diff --git a/doc/go1.22.html b/doc/go1.22.html index fae37143666e1..18d42e5b53c26 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -333,8 +333,10 @@
- TODO: https://go.dev/issue/56381: allow terminating Scanner early cleanly without a final token or an error +
+ When a SplitFunc
returns ErrFinalToken
with a nil
token, Scanner
will now stop immediately.
+ Previously, it would report a final empty token before stopping, which was usually not desired.
+ Callers that do want to report a final empty token can do so by returning []byte{}
rather than nil
.