]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.18: clarify additions to net package API
authorAustin Clements <austin@google.com>
Tue, 7 Dec 2021 21:29:21 +0000 (16:29 -0500)
committerAustin Clements <austin@google.com>
Wed, 8 Dec 2021 17:04:27 +0000 (17:04 +0000)
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>
doc/go1.18.html

index 10a05ad88646cb9f76a91a90e563db11be9b0936..ad08083793fa7c4f56670538e6bc5853790ad455 100644 (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>