From: Ian Lance Taylor
Date: Fri, 19 Jun 2020 05:43:36 +0000 (-0700)
Subject: doc/go1.15: mention consequence of os.File.ReadFrom
X-Git-Tag: go1.15rc1~63
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1bb247a469e306c57a5e0eaba788efb8b3b1acef;p=gostls13.git
doc/go1.15: mention consequence of os.File.ReadFrom
Now that we've added a os.File.ReadFrom method, io.CopyBuffer to a
os.File will no longer use the provided buffer.
For #16474
For #36817
For #37419
Change-Id: I79a3bf778ff93eab88e88dd9ecbb8c7ea101e868
Reviewed-on: https://go-review.googlesource.com/c/go/+/238864
Reviewed-by: Dmitri Shuralyov
---
diff --git a/doc/go1.15.html b/doc/go1.15.html
index b6cf5bb8f6..6e98826de2 100644
--- a/doc/go1.15.html
+++ b/doc/go1.15.html
@@ -782,6 +782,20 @@ Do not send CLs removing the interior tags from such phrases.
1.14 with the addition of asynchronous preemption. Now this is
handled transparently.
+
+
+ The os.File
type now
+ supports a ReadFrom
+ method. This permits the use of the copy_file_range
+ system call on some systems when using
+ io.Copy
to copy data
+ from one os.File
to another. A consequence is that
+ io.CopyBuffer
+ will not always use the provided buffer when copying to a
+ os.File
. If a program wants to force the use of
+ the provided buffer, it can be done by writing
+ io.CopyBuffer(struct{ io.Writer }{dst}, src, buf)
.
+