1
0
mirror of https://github.com/golang/go synced 2024-11-23 10:00:03 -07:00

[go] doc: add new bufio functionality

cl/345570
cl/345569

Updates: #47694
Change-Id: I170af16d5fc9f022d3d29ed0772cfc3d02b8bbcf
Reviewed-on: https://go-review.googlesource.com/c/go/+/365317
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
Jeremy Faller 2021-11-19 13:56:24 -05:00
parent ac0da79a67
commit 0f75a9ecdf

View File

@ -236,11 +236,17 @@ proposal</a>.
<dl id="bufio"><dt><a href="/pkg/bufio/">bufio</a></dt>
<dd>
<p><!-- CL 345569 -->
TODO: <a href="https://golang.org/cl/345569">https://golang.org/cl/345569</a>: add Writer.AvailableBuffer
The new <a href="/pkg/bufio#AvailableBuffer"><code>Writer.AvailableBuffer</code></a>
method returns an empty buffer with a possibly non-empty capacity for use
with append-like APIs. After appending, the buffer can be provided to a
succeeding <code>Write</code> call and possibly avoid any copying.
</p>
<p><!-- CL 345570 -->
TODO: <a href="https://golang.org/cl/345570">https://golang.org/cl/345570</a>: make Reader.Reset and Writer.Reset work on the zero value
The methods <a href="/pkg/bufio#Reader.Reset"><code>Reader.Reset</code></a> and
<a href="/pkg/bufio#Writer.Reset"><code>Writer.Reset</code></a>
now use the default buffer size when called on objects with a
<code>nil</code> buffer.
</p>
</dd>
</dl><!-- bufio -->