From: Michael Pratt Date: Mon, 11 Dec 2023 21:37:49 +0000 (-0500) Subject: doc/go1.22: document bufio changes X-Git-Tag: go1.22rc1~35 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1541af5ce81b9f58845fdbf0bf72b7b6965b5e96;p=gostls13.git 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 --- 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.