]> Cypherpunks repositories - gostls13.git/commit
net/netip: use slice-to-array conversions
authorTobias Klauser <tklauser@distanz.ch>
Mon, 7 Nov 2022 22:00:14 +0000 (23:00 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 8 Nov 2022 03:03:40 +0000 (03:03 +0000)
commitdc98ccd836da7d22a5d270b9778fb055826fa07b
tree0b77787976a035bdc636d5ca12cb0102d0ce14d3
parentb417f62b00276a2ccca3fa7e490f3673a1df8a4c
net/netip: use slice-to-array conversions

Resend of CL 432735 (with one additional conversion that the original CL
missed) after it broke the longtest builder on x/tools and was reverted
in CL 433478. Now that x/tools/go/ssa has support for this, the longtest
x/tools build passes as well.

Use slice-to-array conversions in AddrFromSlice and
(*Addr).UnmarshalBinary. This allows using AddrFrom16 and drop the
redundant ipv6Slice helper.

For #46505

Change-Id: I4d8084b7a97f162e4f7d685c86aac56d960ff693
Reviewed-on: https://go-review.googlesource.com/c/go/+/448396
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/net/netip/netip.go