go/src
Joe Tsai e88f89028a bytes, string: add Reset method to Reader
Currently, there is no easy allocation-free way to turn a
[]byte or string into an io.Reader. Thus, we add a Reset method
to bytes.Reader and strings.Reader to allow the reuse of these
Readers with another []byte or string.

This is consistent with the fact that many standard library io.Readers
already support a Reset method of some type:
	bufio.Reader
	flate.Reader
	gzip.Reader
	zlib.Reader
	debug/dwarf.LineReader
	bytes.Buffer
	crypto/rc4.Cipher

Fixes #15033

Change-Id: I456fd1af77af6ef0b4ac6228b058ac1458ff3d19
Reviewed-on: https://go-review.googlesource.com/21386
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-07 18:58:01 +00:00
..
archive all: delete dead test code 2016-03-21 07:10:08 +00:00
bufio all: delete dead test code 2016-03-21 07:10:08 +00:00
builtin
bytes bytes, string: add Reset method to Reader 2016-04-07 18:58:01 +00:00
cmd cmd/link: hide go.dwarf symbols 2016-04-07 18:54:45 +00:00
compress compress/gzip: fix Reader.Reset 2016-04-02 23:36:21 +00:00
container
context context: mark more tests as flaky on OpenBSD 2016-04-07 17:49:26 +00:00
crypto crypto/rsa, crypto/ecdsa: fail earlier on zero parameters 2016-04-05 21:03:20 +00:00
database/sql all: delete dead non-test code 2016-03-25 06:28:13 +00:00
debug debug/gosym: do not forget to close test binay file handle in TestPCLine 2016-04-05 04:43:44 +00:00
encoding encoding/json: respect json.Marshaler when encoding byte kind slices 2016-04-06 20:19:15 +00:00
errors
expvar expvar: Ensure strings are written as valid JSON. 2016-04-06 03:52:39 +00:00
flag
fmt fmt: hold on to all free buffers, regardless of size 2016-04-03 06:20:37 +00:00
go go/types: make Identical(nil, T) == Identical(T, nil) 2016-04-07 14:21:18 +00:00
hash hash/crc64: Add tests for ECMA polynomial 2016-03-31 20:42:02 +00:00
html html/template: prefix the internally-used FuncMap values with an underscore 2016-04-04 05:23:18 +00:00
image image/jpeg: reconstruct progressive images even if incomplete. 2016-03-31 00:33:24 +00:00
index/suffixarray
internal net, runtime: skip flaky tests on OpenBSD 2016-04-06 19:28:24 +00:00
io io: add ReadAtSizer interface 2016-04-06 04:02:49 +00:00
log
math math/big: re-use memory in Int.GCD 2016-04-07 17:19:37 +00:00
mime mime: fix maximum length of encoded-words 2016-03-29 11:19:31 +00:00
net net, runtime: skip flaky tests on OpenBSD 2016-04-06 19:28:24 +00:00
os os/user: wrap getgrnam_r to fix type issues 2016-04-06 15:49:15 +00:00
path path/filepath: normalize output of EvalSymlinks on windows 2016-04-05 00:39:25 +00:00
reflect reflect: add s390x support 2016-04-06 04:23:06 +00:00
regexp all: delete dead non-test code 2016-03-25 06:28:13 +00:00
runtime runtime: add s390x support (new files and lfstack_64bit.go modifications) 2016-04-07 18:56:54 +00:00
sort all: delete dead non-test code 2016-03-25 06:28:13 +00:00
strconv
strings bytes, string: add Reset method to Reader 2016-04-07 18:58:01 +00:00
sync sync/atomic: add s390x implementations of atomic functions 2016-04-07 15:30:14 +00:00
syscall runtime: use windows.NewLazySystemDLL in mksyscall_windows.go 2016-04-06 16:40:48 +00:00
testing testing: fix flakey test on plan9 2016-04-06 18:35:33 +00:00
text all: delete dead non-test code 2016-03-25 06:28:13 +00:00
time all: delete dead non-test code 2016-03-25 06:28:13 +00:00
unicode
unsafe
vendor/golang.org/x/net/http2/hpack all: fix spelling mistakes 2016-04-03 17:03:15 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash cmd/dist: redo flag-passing for bootstrap 2016-03-18 19:00:03 +00:00
make.bat
make.rc
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc