go/src/mime
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
..
multipart mime/multipart: simplify Part.Read 2016-10-28 19:05:47 +00:00
quotedprintable mime/quotedprintable: accept = not followed by 2 hex digits as literal equals 2016-10-28 16:08:06 +00:00
testdata
encodedword.go
encodedword_test.go
example_test.go
grammar.go
mediatype.go mime: preserve unnecessary backslash escapes as literals 2016-10-27 17:54:59 +00:00
mediatype_test.go mime: preserve unnecessary backslash escapes as literals 2016-10-27 17:54:59 +00:00
type.go
type_dragonfly.go
type_freebsd.go
type_openbsd.go
type_plan9.go
type_test.go
type_unix.go
type_windows.go