Skip to content
Snippets Groups Projects
Commit 3d740bfe authored by Daniel Czerwonk's avatar Daniel Czerwonk
Browse files

removed IsLegacy()

parent a556734a
No related branches found
No related tags found
No related merge requests found
......@@ -47,11 +47,6 @@ func (ip IP) Higher() uint64 {
return ip.higher
}
// IsLegacy returns true for IPv6, else false
func (ip IP) IsLegacy() bool {
return ip.isLegacy
}
// IPv4 returns a new `IP` representing an IPv4 address
func IPv4(val uint32) IP {
return IP{
......
......@@ -55,19 +55,18 @@ func TestIPVersion(t *testing.T) {
}{
{
name: "Test",
ip: IP{isLegacy: true},
ip: IPv4(0),
expected: true,
},
{
name: "Test",
ip: IP{},
ip: IPv6(0, 0),
expected: false,
},
}
for _, test := range tests {
res := test.ip.IsLegacy()
assert.Equal(t, test.expected, res, test.name)
assert.Equal(t, test.expected, test.ip.isLegacy, test.name)
}
}
func TestIPToProto(t *testing.T) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment