1
0
mirror of https://github.com/golang/go synced 2024-10-05 07:11:22 -06:00
Commit Graph

8 Commits

Author SHA1 Message Date
Russ Cox
643ef15b16 io: tweak Reader comment
I think this has the same meaning as before,
but the text is tighter, and it makes some people happy.

Fixes #10182.

Change-Id: I7ee1eae4bcd6ee4a5898ea948648939e6bde5f01
Reviewed-on: https://go-review.googlesource.com/11674
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2015-06-29 21:17:47 +00:00
David Symonds
80864cf1f7 io: minor improvements to doc comment on WriteString.
Change-Id: Iddcd0cfb8f2c2f1c4ad7a94b50a9f65b543862c4
Reviewed-on: https://go-review.googlesource.com/10473
Reviewed-by: Minux Ma <minux@golang.org>
2015-05-29 04:33:15 +00:00
Rob Pike
2c89992f44 io: add CopyBuffer, a version of Copy in which the user provides a buffer
This trivial addition to the io package makes it easy to control the
buffer size and allocation properties of io.Copy.

Change-Id: Ica1a6bd015e429d4e655bc0c6f66cea21c454acf
Reviewed-on: https://go-review.googlesource.com/8730
Reviewed-by: Russ Cox <rsc@golang.org>
2015-04-15 15:59:16 +00:00
Marius Nuennerich
21e37daa49 io/ioutil: fix locking of the tempfile random state
Fixes #10451

Change-Id: I15ed777e9a4a4e1ba1178d07fcbe0ab4bf0d9e50
Reviewed-on: https://go-review.googlesource.com/8936
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-14 19:45:05 +00:00
Péter Surányi
a814c05eba io: clarify Copy docs regarding error handling
"returns ... the first error" was misleading or at least confusing:
in case a Read results in an error with non-zero bytes read, and the
subsequent Write also results in an error, the error from Write is
returned, which is the second one (in the temporal dimension).

Fixes #9744

Change-Id: If8925a701e4fae820cd9df7446503403fc0785d4
Reviewed-on: https://go-review.googlesource.com/3686
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-08 13:39:33 +00:00
Aaron Jacobs
09b7f4f12a io: clarify the behavior of PipeWriter.CloseWithError(nil).
The previous wording implied that reads would return no error, rather
than EOF. It's convenient for users to know that Close() is equivalent
to CloseWithError(nil) because it can remove a branch from their error
handling code where they want to close the pipe in the appropriate way.
For example:

    6e9a8cec0a/gcs/bucket.go (L637-L643)

Change-Id: I618bffe556eb518011e7ba5cdce1eb0ff536350e
Reviewed-on: https://go-review.googlesource.com/8152
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-03-30 09:43:11 +00:00
Russ Cox
3d2321f639 io: clarify Reader returning 0, nil
Fixes #8317.

LGTM=bradfitz
R=bradfitz, iant, r
CC=golang-codereviews
https://golang.org/cl/143100043
2014-09-16 10:01:28 -04:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
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.
2014-09-08 00:08:51 -04:00