Converts an IP to the reverse DNS Style:
{
name: "v4",
IP: net.ParseIP("1.2.3.4"),
output: "4.3.2.1",
},
{
name: "v4",
IP: net.ParseIP("255.255.255.255"),
output: "255.255.255.255",
},
{
name: "v6",
IP: net.ParseIP("2001::"),
output: "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.2",
},
=== RUN Test/v4
test_scratch_9_test.go:43: 22515540 49.38 ns/op
--- PASS: Test/v4 (2.15s)
=== RUN Test/v4#01
test_scratch_9_test.go:43: 17212569 71.24 ns/op
--- PASS: Test/v4#01 (1.30s)
=== RUN Test/v6
test_scratch_9_test.go:43: 23410729 50.83 ns/op
--- PASS: Test/v6 (1.24s)
PASS