From c1ea3395a6fdb2b66e6f445358ca40b78882adce Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 1 Nov 2021 22:25:55 -0700 Subject: [PATCH] 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 --- doc/go1.18.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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