]> Cypherpunks repositories - gostls13.git/commit
net/netip: use slice-to-array conversions
authorTobias Klauser <tklauser@distanz.ch>
Thu, 22 Sep 2022 13:09:49 +0000 (15:09 +0200)
committerGopher Robot <gobot@golang.org>
Fri, 23 Sep 2022 20:32:51 +0000 (20:32 +0000)
commit3dcf6e2c29f533865aad58488b60ae8d819a566e
treeb6ba1f6915293000f32e82cd572fa7b8fd286763
parentc58bfeeb045895f080fff9c76fdbf3d9d8ab683b
net/netip: use slice-to-array conversions

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

For #46505

Change-Id: I0e3a7d8825ad438115b7f23ee97cc74eec41a826
Reviewed-on: https://go-review.googlesource.com/c/go/+/432735
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/net/netip/netip.go