Skip to content

Commit 8fbb8d3

Browse files
committed
core/cp: m godoc
1 parent 9a8285a commit 8fbb8d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

intra/core/cp.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var (
1818

1919
// Pipe copies data from src to dst, and returns the number of bytes copied.
2020
// Prefers src.WriteTo(dst) and dst.ReadFrom(src) if available.
21-
// Otherwise, uses io.CopyBuffer, recycling buffers from global pool.
21+
// Otherwise, it uses core.Stream.
2222
func Pipe(dst io.Writer, src io.Reader) (int64, error) {
2323
if IsNil(src) || IsNil(dst) {
2424
return 0, errNoPipe
@@ -35,7 +35,8 @@ func Pipe(dst io.Writer, src io.Reader) (int64, error) {
3535
}
3636

3737
// Stream reads data from src in to dst until error, and returns the no. of bytes read.
38-
// Internally, it uses io.CopyBuffer, recycling buffers from global pool.
38+
// Internally, it bypasses io.ReaderFrom and io.WriterTo but uses io.CopyBuffer,
39+
// recycling buffers from a global pool.
3940
func Stream(dst io.Writer, src io.Reader) (int64, error) {
4041
if IsNil(src) || IsNil(dst) {
4142
return 0, errNoStream

0 commit comments

Comments
 (0)