]> Cypherpunks repositories - gostls13.git/commit
net/netip: add Addr.AsSlice() method
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 2 Nov 2021 19:44:32 +0000 (20:44 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 5 Nov 2021 22:26:07 +0000 (22:26 +0000)
commitd3a80c795e9368e9dfac4efb49e3ee041513d24a
tree6a70f11a5df44bf070120119224b1254201b5fc4
parent35a588109b2a6d8b610be08d32aaf99ef1549085
net/netip: add Addr.AsSlice() method

We have AddrFrom4, AddrFrom6, AddrFromSlice and As4, As6, but we are
missing AsSlice, so this commit adds the missing function. It also gets
rid of the less ergonomic and inconsistently named IPAddrParts.

Updates #49298.

Change-Id: I1c6a2c32fc6c69b244ab49765412ffe3bbe7e5c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/360874
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/netip/netip.go