From: Ian Lance Taylor Date: Tue, 21 Dec 2021 20:23:53 +0000 (-0800) Subject: doc/go1.18: list new net/netip and net functions and methods X-Git-Tag: go1.18beta2~187 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0f3becf62f3935846490e60e5005e1e4a55bec67;p=gostls13.git doc/go1.18: list new net/netip and net functions and methods For #46518 For #47694 Change-Id: I4848556674baf85ceec350645d9eddcd83f1b2e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/373834 Trust: Ian Lance Taylor Trust: Brad Fitzpatrick Reviewed-by: Brad Fitzpatrick --- diff --git a/doc/go1.18.html b/doc/go1.18.html index a1d1a72552..9c839bdc8f 100644 --- a/doc/go1.18.html +++ b/doc/go1.18.html @@ -457,16 +457,46 @@ Do not send CLs removing the interior tags from such phrases. Prefix, representing a network CIDR prefix.

+

+ The package also defines several functions to create and examine + these new types: + AddrFrom4, + AddrFrom16, + AddrFromSlice, + AddrPortFrom, + IPv4Unspecified, + IPv6LinkLocalAllNodes, + IPv6Unspecified, + MustParseAddr, + MustParseAddrPort, + MustParsePrefix, + ParseAddr, + ParseAddrPort, + ParsePrefix, + PrefixFrom. +

The net package includes new methods that parallel existing methods, but return netip.AddrPort instead of the heavier-weight net.IP or - *net.UDPAddr types. + *net.UDPAddr types: + Resolver.LookupNetIP, + UDPConn.ReadFromUDPAddrPort, + UDPConn.ReadMsgUDPAddrPort, + UDPConn.WriteToUDPAddrPort, + UDPConn.WriteMsgUDPAddrPort. + The new UDPConn methods support allocation-free I/O. +

+

The net package also now includes functions and methods to convert between the existing TCPAddr/UDPAddr - types and netip.AddrPort. + types and netip.AddrPort: + TCPAddrFromAddrPort, + UDPAddrFromAddrPort, + TCPAddr.AddrPort, + UDPAddr.AddrPort.

Minor changes to the library