]> Cypherpunks repositories - gostls13.git/commit
net/netip: add missing encoding.BinaryUnmarshaler to AddrPort and Prefix
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 2 Nov 2021 20:33:23 +0000 (21:33 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 5 Nov 2021 22:27:21 +0000 (22:27 +0000)
commit8f923a4e3c03829874b43291f2bdfd12e2d8189b
tree25ed4490d8efbbbeb85258be0c5e3875d661beca
parentd3a80c795e9368e9dfac4efb49e3ee041513d24a
net/netip: add missing encoding.BinaryUnmarshaler to AddrPort and Prefix

The Addr type got an encoding.BinaryUnmarshaler implementation, but not
AddrPort and Prefix. This commit adds the missing implementation of that
interface to these types. It also adds two round trip tests that follow
the template of the existing one for Addr.

Updates #49298.

Change-Id: Iac633aed8aac579960815bb64d06ff3181214841
Reviewed-on: https://go-review.googlesource.com/c/go/+/360875
Trust: Jason A. Donenfeld <Jason@zx2c4.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/leaf_alts.go
src/net/netip/netip.go
src/net/netip/netip_test.go