From: Brad Fitzpatrick Date: Tue, 2 Nov 2021 05:25:55 +0000 (-0700) Subject: doc/go1.18: add net/netip X-Git-Tag: go1.18beta1~627 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c1ea3395a6fdb2b66e6f445358ca40b78882adce;p=gostls13.git doc/go1.18: add net/netip Updates #46518 Change-Id: Iefc2fec93becc7b36ba2b933ae79f7c9424317fc Reviewed-on: https://go-review.googlesource.com/c/go/+/360634 Reviewed-by: Ian Lance Taylor Trust: Brad Fitzpatrick --- diff --git a/doc/go1.18.html b/doc/go1.18.html index 6fe993d51b..82fe6f4520 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -123,10 +123,33 @@ Do not send CLs removing the interior tags from such phrases.

Core library

+

TODO

TODO: complete this section

+

New net/netip package

+

+ The new net/netip + package defines a new IP address type, Addr + that's a small, comparable, value type. Compared to the existing + net.IP type, the netip.Addr type takes less + memory, is immutable, and is comparable so it supports == + and can be used as a map key. +

+

+ In addition to Addr, the package defines + AddrPort, representing + an IP and port, and + Prefix, representing + a network CIDR prefix. +

+

+ The net package now has methods to send and receive UDP packets + using netip.Addr values instead of the relatively heavy + *net.UDPAddr values. +

+

Minor changes to the library