We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50cc0e4 commit 9be5ad6Copy full SHA for 9be5ad6
convert_test.go
@@ -141,4 +141,10 @@ func TestDialArgs(t *testing.T) {
141
test("/ip4/127.0.0.1/tcp/4321", "tcp4", "127.0.0.1:4321")
142
test("/ip6/::1/udp/1234", "udp6", "[::1]:1234")
143
test("/ip6/::1/tcp/4321", "tcp6", "[::1]:4321")
144
+ test("/ip6/::1", "ip6", "::1") // Just an IP
145
+ test("/ip4/1.2.3.4", "ip4", "1.2.3.4") // Just an IP
146
+ test("/ip6zone/foo/ip6/::1/tcp/4321", "tcp6", "[::1%foo]:4321") // zone
147
+ test("/ip6zone/foo/ip6/::1", "ip6", "::1%foo") // no TCP
148
+ test("/ip6zone/foo/ip6/::1/ip6zone/bar", "ip6", "::1%foo") // IP over IP
149
+ test("/ip6zone/foo/ip4/127.0.0.1/ip6zone/bar", "ip4", "127.0.0.1") // Skip zones in IP
150
}
0 commit comments