diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2022-09-28 14:02:18 +0200 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-07 17:53:23 +0000 |
| commit | 77c0e99c192331d44ddab664c4b6442925410cdc (patch) | |
| tree | 98feb35ebdb526120632fdbd4d5ef0df2d892745 /src/net | |
| parent | cecaa25bd31622f5ae0df7fd5c8c7f02afde8715 (diff) | |
| download | go-77c0e99c192331d44ddab664c4b6442925410cdc.tar.xz | |
net/netip: use IPv4Unspecified in TestIPProperties
Also inline the single-use unspecified{4,6} variables.
Change-Id: I5992273031e0b8db1bc6f5de8fce669310226ee9
Reviewed-on: https://go-review.googlesource.com/c/go/+/435915
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/netip/netip_test.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/net/netip/netip_test.go b/src/net/netip/netip_test.go index b0915bd8e9..bd1fe0c837 100644 --- a/src/net/netip/netip_test.go +++ b/src/net/netip/netip_test.go @@ -559,9 +559,6 @@ func TestIPProperties(t *testing.T) { private4b = mustIP("172.16.0.1") private4c = mustIP("192.168.1.1") private6 = mustIP("fd00::1") - - unspecified4 = AddrFrom4([4]byte{}) - unspecified6 = IPv6Unspecified() ) tests := []struct { @@ -686,12 +683,12 @@ func TestIPProperties(t *testing.T) { }, { name: "unspecified v4Addr", - ip: unspecified4, + ip: IPv4Unspecified(), unspecified: true, }, { name: "unspecified v6Addr", - ip: unspecified6, + ip: IPv6Unspecified(), unspecified: true, }, } |
