]> Cypherpunks.ru repositories - gostls13.git/commit
bufio: avoid rescanning buffer multiple times in ReadSlice
authorandrius4669 <andrius4669@gmail.com>
Thu, 17 May 2018 14:43:30 +0000 (14:43 +0000)
committerIan Lance Taylor <iant@golang.org>
Wed, 22 Aug 2018 17:06:28 +0000 (17:06 +0000)
commita21ae28f39fc5a27bb1391802195d1c6e2993f29
tree205d2d3ab6b9d7bc1b900f75beba99f3dc62fcdb
parent5ddecd150821713c53de15f439c7925b28c9f535
bufio: avoid rescanning buffer multiple times in ReadSlice

When existing data in buffer does not have delimiter,
and new data is added with b.fill(), continue search from
previous point instead of starting from beginning.

Change-Id: Id78332afe2b0281b4a3c86bd1ffe9449cfea7848
GitHub-Last-Rev: 08e7d2f50151a00b22800e3f7020d0de8dee7dcf
GitHub-Pull-Request: golang/go#25441
Reviewed-on: https://go-review.googlesource.com/113535
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/bufio/bufio.go