summaryrefslogtreecommitdiff
path: root/src/bytes/export_test.go
Commit message (Collapse)AuthorAgeFilesLines
* bytes: export Cap method for bufferCristian Staretu2015-04-031-4/+0
| | | | | | | | | | | | | | | | | | | | | Obtaining the actual size of the underlying storage of the buffer can be very useful in various scenarios. Long running programs which write and read large amounts of data to buffers might have to recycle buffers in order to avoid holding onto potentially huge buffers. For example, a piece of code which buffers a lot of data in a buffer might need to release the big buffer and start again with a smaller buffer after it finished processing the huge amount of data. In cases where pools of bytes.Buffer are used, being able to check the size of the allocated data can be very useful. Instead of forking bytes.Buffer or writing new code, we can export the Cap() method. Change-Id: I79d4f0a3cff53b9419d82c8122964761e9e38566 Reviewed-on: https://go-review.googlesource.com/8342 Reviewed-by: Rob Pike <r@golang.org>
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+13
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.