From 8b2dbc52ec6bc0359b4b8c47a3f9835e9460649e Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 7 Apr 2020 08:33:45 -0600 Subject: core: Rename ParsedAddress -> NetworkAddress --- listeners_test.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'listeners_test.go') diff --git a/listeners_test.go b/listeners_test.go index 25e1394..2828a3b 100644 --- a/listeners_test.go +++ b/listeners_test.go @@ -153,7 +153,7 @@ func TestJoinNetworkAddress(t *testing.T) { func TestParseNetworkAddress(t *testing.T) { for i, tc := range []struct { input string - expectAddr ParsedAddress + expectAddr NetworkAddress expectErr bool }{ { @@ -166,7 +166,7 @@ func TestParseNetworkAddress(t *testing.T) { }, { input: ":1234", - expectAddr: ParsedAddress{ + expectAddr: NetworkAddress{ Network: "tcp", Host: "", StartPort: 1234, @@ -175,7 +175,7 @@ func TestParseNetworkAddress(t *testing.T) { }, { input: "tcp/:1234", - expectAddr: ParsedAddress{ + expectAddr: NetworkAddress{ Network: "tcp", Host: "", StartPort: 1234, @@ -184,7 +184,7 @@ func TestParseNetworkAddress(t *testing.T) { }, { input: "tcp6/:1234", - expectAddr: ParsedAddress{ + expectAddr: NetworkAddress{ Network: "tcp6", Host: "", StartPort: 1234, @@ -193,7 +193,7 @@ func TestParseNetworkAddress(t *testing.T) { }, { input: "tcp4/localhost:1234", - expectAddr: ParsedAddress{ + expectAddr: NetworkAddress{ Network: "tcp4", Host: "localhost", StartPort: 1234, @@ -202,14 +202,14 @@ func TestParseNetworkAddress(t *testing.T) { }, { input: "unix//foo/bar", - expectAddr: ParsedAddress{ + expectAddr: NetworkAddress{ Network: "unix", Host: "/foo/bar", }, }, { input: "localhost:1234-1234", - expectAddr: ParsedAddress{ + expectAddr: NetworkAddress{ Network: "tcp", Host: "localhost", StartPort: 1234, @@ -222,7 +222,7 @@ func TestParseNetworkAddress(t *testing.T) { }, { input: "localhost:0", - expectAddr: ParsedAddress{ + expectAddr: NetworkAddress{ Network: "tcp", Host: "localhost", StartPort: 0, @@ -253,12 +253,12 @@ func TestParseNetworkAddress(t *testing.T) { func TestJoinHostPort(t *testing.T) { for i, tc := range []struct { - pa ParsedAddress + pa NetworkAddress offset uint expect string }{ { - pa: ParsedAddress{ + pa: NetworkAddress{ Network: "tcp", Host: "localhost", StartPort: 1234, @@ -267,7 +267,7 @@ func TestJoinHostPort(t *testing.T) { expect: "localhost:1234", }, { - pa: ParsedAddress{ + pa: NetworkAddress{ Network: "tcp", Host: "localhost", StartPort: 1234, @@ -276,7 +276,7 @@ func TestJoinHostPort(t *testing.T) { expect: "localhost:1234", }, { - pa: ParsedAddress{ + pa: NetworkAddress{ Network: "tcp", Host: "localhost", StartPort: 1234, @@ -286,7 +286,7 @@ func TestJoinHostPort(t *testing.T) { expect: "localhost:1235", }, { - pa: ParsedAddress{ + pa: NetworkAddress{ Network: "unix", Host: "/run/php/php7.3-fpm.sock", }, -- cgit v1.2.3