doc/go1.18: clarify additions to net package API

For #47694.

Updates #46518.

Change-Id: Ife3a8d3d6a1c50f55b5ab15730d5a6bd3ec512e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/370134
Trust: Austin Clements <austin@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Austin Clements 2021-12-07 16:29:21 -05:00
parent f5b5939c28
commit c759ec2284

View file

@ -360,9 +360,15 @@ Do not send CLs removing the interior tags from such phrases.
a network CIDR prefix.
</p>
<p>
The <code>net</code> package now has methods to send and receive UDP packets
using <code>netip.Addr</code> values instead of the relatively heavy
<code>*net.UDPAddr</code> values.
The <a href="/pkg/net/"><code>net</code></a> package includes new
methods that parallel existing methods, but
return <code>netip.AddrPort</code> instead of the
heavier-weight <a href="/pkg/net/#IP"><code>net.IP</code></a> or
<a href="/pkg/net/#UDPAddr"<code>*net.UDPAddr</code></a> types.
The <code>net</code> package also now includes functions and methods
to convert between the existing
<a href="/pkg/net/#TCPAddr"><code>TCPAddr</code>/<a href="/pkg/net/#UDPAddr"><code>UDPAddr</code>
types and <code>netip.AddrPort</code>.
</p>
<h3>TODO</h3>
@ -599,12 +605,6 @@ Do not send CLs removing the interior tags from such phrases.
<a href="/pkg/net#Error"><code>net.Error.Temporary</code></a> has been deprecated.
</p>
</dd>
<dd>
<p>
TODO: Several new net APIs.
</p>
</dd>
</dl><!-- net -->
<dl id="net/http"><dt><a href="/pkg/net/http/">net/http</a></dt>