]> Cypherpunks repositories - gostls13.git/commit
regexp: limit the capacity of slices of bytes returned by FindX
authorFrancesc Campoy <campoy@golang.org>
Mon, 11 Feb 2019 14:33:12 +0000 (16:33 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Feb 2019 23:51:17 +0000 (23:51 +0000)
commit20930c7623be7c78189898795d089002c2f9de41
tree447fabfa76868cc614765a972cf22be0544b6d55
parent98cbf45cfc6a5a50cc6ac2367f9572cb198b57c7
regexp: limit the capacity of slices of bytes returned by FindX

This change limits the capacity of the slices of bytes returned by:

- Find
- FindAll
- FindAllSubmatch

to be the same as their length.

Fixes #30169

Change-Id: I07b632757d2bfeab42fce0d42364e2a16c597360
Reviewed-on: https://go-review.googlesource.com/c/161877
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/regexp/find_test.go
src/regexp/regexp.go