From 1541af5ce81b9f58845fdbf0bf72b7b6965b5e96 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Mon, 11 Dec 2023 16:37:49 -0500 Subject: [PATCH] doc/go1.22: document bufio changes For #61422. Change-Id: I1b20c536a5b1c105286c84e7c1c7e37eb89bbc93 Reviewed-on: https://go-review.googlesource.com/c/go/+/548879 Reviewed-by: Michael Knyszek Auto-Submit: Michael Pratt LUCI-TryBot-Result: Go LUCI --- doc/go1.22.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/go1.22.html b/doc/go1.22.html index fae3714366..18d42e5b53 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -333,8 +333,10 @@ defer func() {
bufio
-

- 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.

-- 2.50.0