]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.16: mention new testing/iotest functions
authorIan Lance Taylor <iant@golang.org>
Fri, 22 Jan 2021 06:47:18 +0000 (22:47 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 25 Jan 2021 23:52:43 +0000 (23:52 +0000)
For #38781
For #40700
For #41190

Change-Id: I72f1055e51edb517041d3861640734ba6ef5f342
Reviewed-on: https://go-review.googlesource.com/c/go/+/285673
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
doc/go1.16.html

index 37a2160944b2c08b0bae0538f9ea08d6d9c2a41c..1a88568acb13bdb64ac6214c9b2fa019773c103d 100644 (file)
@@ -1071,6 +1071,25 @@ func TestFoo(t *testing.T) {
   </dd>
 </dl><!-- syscall -->
 
+<dl id="testing/iotest"><dt><a href="/pkg/testing/iotest/">testing/iotest</a></dt>
+  <dd>
+    <p><!-- CL 199501 -->
+      The new
+      <a href="/pkg/testing/iotest/#ErrReader"><code>ErrReader</code></a>
+      function returns an
+      <a href="/pkg/io/#Reader"><code>io.Reader</code></a> that always
+      returns an error.
+    </p>
+
+    <p><!-- CL 243909 -->
+      The new
+      <a href="/pkg/testing/iotest/#TestReader"><code>TestReader</code></a>
+      function tests that an <a href="/pkg/io/#Reader"><code>io.Reader</code></a>
+      behaves correctly.
+    </p>
+  </dd>
+</dl><!-- testing/iotest -->
+
 <dl id="text/template"><dt><a href="/pkg/text/template/">text/template</a></dt>
   <dd>
     <p><!-- CL 254257, golang.org/issue/29770 -->