1
0
mirror of https://github.com/golang/go synced 2024-11-20 09:04:44 -07:00
go/src
Russ Cox ef3df18944 mime/multipart: simplify Part.Read
The basic structure of Part.Read should be simple:
do what you can with the current buffered data,
reading more as you need it. Make it that way.

Working entirely in the bufio.Reader's buffer eliminates
the need for an additional bytes.Buffer.

This structure should be easier to extend in the future as
more special cases arise.

Change-Id: I83cb24a755a1767c4c037f9ece6716460c3ecd01
Reviewed-on: https://go-review.googlesource.com/32092
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-10-28 19:05:47 +00:00
..
archive archive/tar: validate sparse headers in parsePAX 2016-10-22 16:35:14 +00:00
bufio bufio: remove unnecessary "continue" 2016-10-24 14:49:44 +00:00
builtin
bytes bytes, strings: optimize for ASCII sets 2016-10-28 17:37:04 +00:00
cmd runtime, cmd/compile: rename memclr -> memclrNoHeapPointers 2016-10-28 18:20:33 +00:00
compress compress/flate: make compression level 0 consistent 2016-10-27 00:58:30 +00:00
container
context context: add comments to the WithCancel example, apply minor improvements 2016-10-26 22:35:07 +00:00
crypto crypto/tls: add GetClientCertificate callback 2016-10-27 17:20:07 +00:00
database/sql database/sql: fix possible context leak in test 2016-10-24 17:56:11 +00:00
debug cmd/dist: use debug/pe directly for cmd/link 2016-10-17 15:22:17 +00:00
encoding encoding/json: marshal the RawMessage value type the same as its pointer type 2016-10-26 21:03:00 +00:00
errors
expvar expvar: add Value methods 2016-10-13 21:39:03 +00:00
flag flag: arrange for FlagSet.Usage to be non-nil by default 2016-10-26 16:13:40 +00:00
fmt fmt: document that unexported struct fields don't get the String/Error treatment 2016-10-26 13:56:45 +00:00
go Revert "runtime/pprof: write profiles in protobuf format." 2016-10-28 18:41:16 +00:00
hash
html html/template, text/template: drop defined template list from errors 2016-10-28 17:10:55 +00:00
image image/png: implement grayscale transparency. 2016-10-28 02:10:13 +00:00
index/suffixarray
internal runtime/trace, internal/trace: script to collect canned traces 2016-10-28 17:46:49 +00:00
io io: clarify Pipe docs 2016-10-18 12:53:56 +00:00
log all: freeze net/rpc and reword the 'frozen' message in other frozen packages 2016-10-26 16:11:07 +00:00
math math/big: flip long/short flag on TestFloat32Distribution 2016-10-27 21:44:37 +00:00
mime mime/multipart: simplify Part.Read 2016-10-28 19:05:47 +00:00
net net: add (*UnixListener).SetUnlinkOnClose 2016-10-28 18:29:35 +00:00
os os: consider only files from #M as regular on Plan 9 2016-10-26 16:18:00 +00:00
path path/filepath: make TestToNorm robust 2016-10-25 01:57:05 +00:00
plugin plugin: mention OS X support and concurrency 2016-10-19 17:24:19 +00:00
reflect runtime, cmd/compile: rename memclr -> memclrNoHeapPointers 2016-10-28 18:20:33 +00:00
regexp regexp: avoid alloc in QuoteMeta when not quoting 2016-10-19 07:09:08 +00:00
runtime Revert "runtime/pprof: write profiles in protobuf format." 2016-10-28 18:41:16 +00:00
sort sort: fix a slice benchmark not using the stable variant, add another 2016-10-05 14:43:23 +00:00
strconv strconv: strip \r in raw strings passed to Unquote 2016-10-17 18:34:02 +00:00
strings bytes, strings: optimize for ASCII sets 2016-10-28 17:37:04 +00:00
sync runtime: Profile goroutines holding contended mutexes. 2016-10-28 11:47:16 +00:00
syscall syscall: use name+(NN)FP on plan9/amd64 2016-10-25 22:13:35 +00:00
testing runtime: Profile goroutines holding contended mutexes. 2016-10-28 11:47:16 +00:00
text html/template, text/template: drop defined template list from errors 2016-10-28 17:10:55 +00:00
time time: revise Timer comments for Stop, Reset 2016-10-18 12:55:24 +00:00
unicode unicode/utf8: optimize ValidRune 2016-10-26 23:02:52 +00:00
unsafe
vendor/golang_org/x vendor/golang_org/x/crypto/poly1305: sync to 1150b8bd09e53aea1d415621adae9bad665061a1 2016-10-27 18:03:11 +00:00
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc